client

package
v0.0.0-...-31e3ec6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

README

Open Source API Client

godoc

This package is used to connect and query the Open Source API. This uses the internal data modeling of the API to preform requests over the line.

Example

package main

import (
	"github.com/opensourceorg/api/client"
	"log"
)

func ohshit(err error) {
	if err != nil {
		panic(err)
	}
}

func main() {
	license, err := client.Get("Apache-2.0")
	ohshit(err)
	log.Printf("%s\n", license.Name)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All() (license.Licenses, error)

Return a list of all known Licenses.

func Get

func Get(id string) (license.License, error)

func Tagged

func Tagged(keyword string) (license.Licenses, error)

Return a list of all licenses which contain the keyword that was passed in.

Types

type BadRequest

type BadRequest struct {
	// contains filtered or unexported fields
}

func (BadRequest) Error

func (b BadRequest) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL