client

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 4 Imported by: 1

README

infinite-go

Go bindings for the Infinite Industries API.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAuthToken

func SetAuthToken(token string) optionFunc

SetAuthToken is a client option for setting the auth token used accessing Org Manager

func SetBaseURL

func SetBaseURL(baseURL string) optionFunc

SetBaseURL is a client option for setting the base url

func SetHttpClient

func SetHttpClient(httpClient *http.Client) optionFunc

SetHttpClient is a client option for setting the *http.Client

func SetUserAgent

func SetUserAgent(ua string) optionFunc

SetUserAgent is a client option for setting the user agent.

Types

type Client

type Client struct {

	// the services this client can work with
	Version *VersionService
	Events  *EventsService
	Venues  *VenuesService
	// contains filtered or unexported fields
}

func New

func New(optionFuncs ...optionFunc) *Client

type Error

type Error struct {
	Details  []string
	Response *ErrorResponse
}

func (*Error) Error

func (e *Error) Error() string

type ErrorResponse

type ErrorResponse struct {
	StatusCode int    `json:"statusCode"`
	ErrorStr   string `json:"error"`
}

An ErrorResponse reports the error caused by an API request

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type EventResponse

type EventResponse struct {
	Event  infinite.Event `json:"event"`
	Status string         `json:"status"`
}

type EventsParams

type EventsParams struct {
	Tags []string `url:"tags,omitempty"`
}

type EventsResponse

type EventsResponse struct {
	Events []infinite.Event `json:"events"`
	Status string           `json:"status"`
}

type EventsService

type EventsService service

EventsService queries the events of the II API.

func (*EventsService) Create

func (v *EventsService) Create(evt infinite.Event) (infinite.Event, error)

Create a new event

func (*EventsService) CurrentVerified

func (v *EventsService) CurrentVerified(tags ...string) ([]infinite.Event, error)

func (*EventsService) Get

func (v *EventsService) Get(id string) (infinite.Event, error)

Get a specific event

type VenueResponse

type VenueResponse struct {
	Venue  infinite.Venue `json:"venue"`
	Status string         `json:"status"`
}

type VenuesResponse

type VenuesResponse struct {
	Venues []infinite.Venue `json:"venues"`
	Status string           `json:"status"`
}

type VenuesService

type VenuesService service

VenuesService queries the venues of the II API.

func (*VenuesService) Get

func (v *VenuesService) Get(id string) (infinite.Venue, error)

verify license for an organization

type VersionService

type VersionService service

VersionService queries the version of the II API.

func (*VersionService) Get

func (v *VersionService) Get() (infinite.Version, error)

verify license for an organization

Directories

Path Synopsis
examples
ii
formats

Jump to

Keyboard shortcuts

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