Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthEndpoints ¶
type AuthEndpoints struct {
// contains filtered or unexported fields
}
AuthEndpoints are the main authorization endpoints
Default ones will be:
// authorization : '/oauth/authorize', // accessToken : '/oauth/access_token', // clientCredentials : '/oauth/authorize/client'
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the type of object that identifies the user.
func (*Client) GenerateAuthAccessToken ¶
GenerateAuthAccessToken generates an access token it order to make authorized requests The function takes code and a redirect_uri and returns an access_token.
func (*Client) GenerateUnauthAccessToken ¶
GenerateUnauthAccessToken generates an access token it order to make authorized requests The function takes code and a redirect_uri and returns an access_token.
func (*Client) Request ¶
Request performs an api call. There are two ways for that:
- Provide only URL If an URL is provided, then the default settings will be set. => GET https://api.vimeo.com/{url provided}
- Options If there is a options map provided, then those elements will be added to the request query. The only required one is options["path"].Options can include hostname, port, query (applied to the URL if the method is GET and in the request body if POST), headers, path (can also include a querystring) and method.
The function will return the response body and error.
func (*Client) UploadVideo ¶
UploadVideo is used in order to upload a video to Vimeo
type Request ¶
type Request struct { Path string `json:"path"` Method string `json:"method"` Query map[string]string Headers map[string]string // contains filtered or unexported fields }
Request shows the structure of a request Default ones will be: protocol : 'https:', hostname : 'api.vimeo.com', port : 443, method : 'GET', query : {},
headers : { Accept: "application/vnd.vimeo.*+json;version=3.2", 'User-Agent': 'Vimeo.js/1.1.4'