Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MulticraftAPIClient ¶
type MulticraftAPIClient struct { Client *resty.Client // contains filtered or unexported fields }
MulticraftAPIClient holds the information, and underlying HTTP client to talk to a Multicraft API
func New ¶
func New(url, user, apiKey string) *MulticraftAPIClient
New creates a new *MulticraftAPIClient, which uses the specified url, user, and apiKey
func (*MulticraftAPIClient) Do ¶
func (mc *MulticraftAPIClient) Do(method string, params map[string]string) ( *MulticraftResponse, error)
Do performs a requests against the API client, attaching the necessary data and credentials in the expected format
type MulticraftResponse ¶
type MulticraftResponse struct { Success bool `json:"success"` Errors []string `json:"errors"` Data interface{} `json:"data"` }
func (*MulticraftResponse) Error ¶
func (mr *MulticraftResponse) Error() string
func (*MulticraftResponse) IsError ¶
func (mr *MulticraftResponse) IsError() bool
Click to show internal directories.
Click to hide internal directories.