throttle

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2017 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
}

Request :

Empty Request struct for easy function access.

func (*Request) Get

func (r *Request) Get(c *sa.Client, user string) (*Response, error)

Get :

Executes a post to the users throttle/ endpoint.

Parameters:

[Required] r: should have all required fields of the struct populated before using.
[Required] c: passing in the client containing authorization and host information.
[Required] user: the user id of the user you wish to get the throttle status for.

Returns:

Response: Struct marshaled from the Json response from the API endpoints.
Error: If an error is encountered, response will be nil and the error must be handled.

func (*Request) Put

func (r *Request) Put(c *sa.Client, user string) (*Response, error)

Put :

Executes a put request to the users throttle/ endpoint.

Parameters:

[Required] r: should have all required fields of the struct populated before using.
[Required] c: passing in the client containing authorization and host information.
[Required] user: the user id of the user you wish to reset the throttle status for.

Returns:

Response: Struct marshaled from the Json response from the API endpoints.
Error: If an error is encountered, response will be nil and the error must be handled.

type Response

type Response struct {
	Status       string         `json:"status,omitempty"`
	Message      string         `json:"message,omitempty"`
	Count        int            `json:"count,omitempty"`
	HTTPResponse *http.Response `json:"-,omitempty"`
}

Response :

Response struct that will be populated after the request.

Jump to

Keyboard shortcuts

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