Documentation ¶
Index ¶
- type Client
- func (c Client) Event(id int) (*data.Event, error)
- func (c Client) Events(rq *RequestQuery, es *[]data.Event) (*ClientResponse, error)
- func (c Client) RequestEvents(rq *RequestQuery) (*EventsResponse, error)
- func (c Client) RequestUsers(rq *RequestQuery) (*UsersResponse, error)
- func (c Client) User(id int) (*data.User, error)
- func (c Client) Users(rq *RequestQuery, us *[]data.User) (*ClientResponse, error)
- type ClientResponse
- type EventsResponse
- type RequestQuery
- type ResponsePagination
- type UsersResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client - Api client struct
func MakeClient ¶
MakeClient - Generates an api client. Pass in httpClient to override defaults
func (Client) Events ¶
func (c Client) Events(rq *RequestQuery, es *[]data.Event) (*ClientResponse, error)
Events - Get events from the api client
func (Client) RequestEvents ¶ added in v0.3.0
func (c Client) RequestEvents(rq *RequestQuery) (*EventsResponse, error)
RequestEvents - Requests events from the client
func (Client) RequestUsers ¶ added in v0.3.0
func (c Client) RequestUsers(rq *RequestQuery) (*UsersResponse, error)
RequestUsers - Requests users from the client
func (Client) Users ¶
func (c Client) Users(rq *RequestQuery, us *[]data.User) (*ClientResponse, error)
Users - Get users from the api client
type ClientResponse ¶ added in v0.3.0
type ClientResponse struct { Data interface{} Pagination ResponsePagination }
ClientResponse - Response structure from any of the multiple requests
type EventsResponse ¶
type EventsResponse struct { Events []data.Event Pagination ResponsePagination }
EventsResponse - Response back from the client on requesting events
type RequestQuery ¶
type RequestQuery struct { View string `url:"view"` Sort string `url:"sort"` Filter string `url:"filter"` SelectedPage int `url:"selectedPage"` PageSize int `url:"pageSize"` }
RequestQuery - Query used to request different variables
func (*RequestQuery) NextPage ¶ added in v0.3.0
func (rq *RequestQuery) NextPage(rp ResponsePagination) error
NextPage - Update the request query to get the next page. Throws an error if there is not another page
type ResponsePagination ¶
ResponsePagination - Struct detailing what data has been returned and is available
type UsersResponse ¶
type UsersResponse struct { Users []data.User Pagination ResponsePagination }
UsersResponse - Response back from the client on requesting users