Documentation
¶
Overview ¶
Package behavior provides the Files.com Behavior API client.
Index ¶
- func Create(params files_sdk.BehaviorCreateParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
- func Delete(params files_sdk.BehaviorDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
- func Find(params files_sdk.BehaviorFindParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
- func Update(params files_sdk.BehaviorUpdateParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
- func UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
- func WebhookTest(params files_sdk.BehaviorWebhookTestParams, ...) (err error)
- type Client
- func (c *Client) Create(params files_sdk.BehaviorCreateParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
- func (c *Client) Delete(params files_sdk.BehaviorDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
- func (c *Client) Find(params files_sdk.BehaviorFindParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
- func (c *Client) List(params files_sdk.BehaviorListParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
- func (c *Client) ListFor(params files_sdk.BehaviorListForParams, ...) (*Iter, error)
- func (c *Client) Update(params files_sdk.BehaviorUpdateParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
- func (c *Client) UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
- func (c *Client) WebhookTest(params files_sdk.BehaviorWebhookTestParams, ...) (err error)
- type Iter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(params files_sdk.BehaviorCreateParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
Create calls Client.Create using the default configuration.
func Delete ¶
func Delete(params files_sdk.BehaviorDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
Delete calls Client.Delete using the default configuration.
func Find ¶
func Find(params files_sdk.BehaviorFindParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
Find calls Client.Find using the default configuration.
func Update ¶
func Update(params files_sdk.BehaviorUpdateParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
Update calls Client.Update using the default configuration.
func UpdateWithMap ¶
func UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
UpdateWithMap calls Client.UpdateWithMap using the default configuration.
func WebhookTest ¶
func WebhookTest(params files_sdk.BehaviorWebhookTestParams, opts ...files_sdk.RequestResponseOption) (err error)
WebhookTest calls Client.WebhookTest using the default configuration.
Types ¶
type Client ¶
Client calls the Behavior API using its embedded Config.
func (*Client) Create ¶
func (c *Client) Create(params files_sdk.BehaviorCreateParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
Create calls POST /behaviors.
func (*Client) Delete ¶
func (c *Client) Delete(params files_sdk.BehaviorDeleteParams, opts ...files_sdk.RequestResponseOption) (err error)
Delete calls DELETE /behaviors/{id}.
func (*Client) Find ¶
func (c *Client) Find(params files_sdk.BehaviorFindParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
Find calls GET /behaviors/{id}.
func (*Client) List ¶
func (c *Client) List(params files_sdk.BehaviorListParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
List returns an iterator for GET /behaviors. Pages are requested as iteration reaches them: range over Iter.All, or call Next and then check Err.
func (*Client) ListFor ¶
func (c *Client) ListFor(params files_sdk.BehaviorListForParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
ListFor returns an iterator for GET /behaviors/folders/{path}. Pages are requested as iteration reaches them: range over Iter.All, or call Next and then check Err.
API operation: List Behaviors by Path.
func (*Client) Update ¶
func (c *Client) Update(params files_sdk.BehaviorUpdateParams, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
Update calls PATCH /behaviors/{id}.
func (*Client) UpdateWithMap ¶
func (c *Client) UpdateWithMap(params map[string]interface{}, opts ...files_sdk.RequestResponseOption) (behavior files_sdk.Behavior, err error)
UpdateWithMap calls PATCH /behaviors/{id} using API parameter names as map keys. Include any path parameters in the map. Unlike optional struct fields, explicit zero values in the map are included in the request.
func (*Client) WebhookTest ¶
func (c *Client) WebhookTest(params files_sdk.BehaviorWebhookTestParams, opts ...files_sdk.RequestResponseOption) (err error)
WebhookTest calls POST /behaviors/webhook/test.
API operation: Test Webhook.
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 List ¶
func List(params files_sdk.BehaviorListParams, 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 ListFor ¶
func ListFor(params files_sdk.BehaviorListForParams, opts ...files_sdk.RequestResponseOption) (*Iter, error)
ListFor returns a listing iterator using the default configuration. See Client.ListFor 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.
func (*Iter) Behavior ¶
Behavior returns the current resource. Call it only after Next returns true.
func (*Iter) LoadResource ¶
func (i *Iter) LoadResource(identifier interface{}, opts ...files_sdk.RequestResponseOption) (interface{}, error)
LoadResource fetches a resource by its ID. identifier must have type int64.