Documentation
¶
Overview ¶
Package request provides the Files.com Request API client.
Index ¶
- func Create(params files_sdk.RequestCreateParams, opts ...files_sdk.RequestResponseOption) (request files_sdk.Request, err error)
- func Delete(params files_sdk.RequestDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
- type Client
- func (c *Client) Create(params files_sdk.RequestCreateParams, opts ...files_sdk.RequestResponseOption) (request files_sdk.Request, err error)
- func (c *Client) Delete(params files_sdk.RequestDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
- func (c *Client) GetFolder(params files_sdk.RequestGetFolderParams, ...) (*Iter, error)
- func (c *Client) List(params files_sdk.RequestListParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
- type Iter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(params files_sdk.RequestCreateParams, opts ...files_sdk.RequestResponseOption) (request files_sdk.Request, err error)
Create calls Client.Create using the default configuration.
func Delete ¶
func Delete(params files_sdk.RequestDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
Delete calls Client.Delete using the default configuration.
Types ¶
type Client ¶
Client calls the Request API using its embedded Config.
func (*Client) Create ¶
func (c *Client) Create(params files_sdk.RequestCreateParams, opts ...files_sdk.RequestResponseOption) (request files_sdk.Request, err error)
Create calls POST /requests.
func (*Client) Delete ¶
func (c *Client) Delete(params files_sdk.RequestDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
Delete calls DELETE /requests/{id}.
func (*Client) GetFolder ¶
func (c *Client) GetFolder(params files_sdk.RequestGetFolderParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
GetFolder returns an iterator for GET /requests/folders/{path}. Pages are requested as iteration reaches them: range over Iter.All, or call Next and then check Err.
func (*Client) List ¶
func (c *Client) List(params files_sdk.RequestListParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
List returns an iterator for GET /requests. Pages are requested as iteration reaches them: range over Iter.All, or call Next and then check Err.
type Iter ¶
Iter traverses a paginated API response. Range over All to get each resource with a nil error, followed by the error that stopped the listing, if any. Alternatively, call Next before reading the current resource, then check Err after Next returns false.
func GetFolder ¶
func GetFolder(params files_sdk.RequestGetFolderParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
GetFolder returns a listing iterator using the default configuration. See Client.GetFolder for the operation and paging behavior.
func List ¶
func List(params files_sdk.RequestListParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
List returns a listing iterator using the default configuration. See Client.List for the operation and paging behavior.
func (*Iter) All ¶ added in v3.3.301
All returns an iterator over the listing's remaining resources, each with a nil error, followed by the error that stops the listing, if any. Pages are requested as the loop reaches them. See files_sdk.IterAll.