diff --git a/client.go b/client.go index 480e020..7f37792 100644 --- a/client.go +++ b/client.go @@ -23,6 +23,15 @@ func NewClient(clientID string, secret string, APIBase string) (*Client, error) }, nil } +// SetAccessToken sets saved token to current client +func (c *Client) SetAccessToken(token string) error { + c.Token = &TokenResponse{ + Token: token, + } + + return nil +} + // Send makes a request to the API, the response body will be // unmarshaled into v, or if v is an io.Writer, the response will // be written to it without decoding