Documentation ¶
Overview ¶
Package activities contains auto-generated files. DO NOT MODIFY
Package activities contains auto-generated files. DO NOT MODIFY
Package activities contains auto-generated files. DO NOT MODIFY
Index ¶
- type ActivitiesPage
- type ActivitiesPageOptions
- type ActivitiesPageResponse
- type ActivitiesPaginator
- type Client
- func (c Client) Create(input *CreateActivityInput) (*CreateActivityResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateActivityInput) (*CreateActivityResponse, error)
- func (c *Client) NewActivitiesPaginator() *ActivitiesPaginator
- func (c *Client) NewActivitiesPaginatorWithOptions(options *ActivitiesPageOptions) *ActivitiesPaginator
- func (c Client) Page(options *ActivitiesPageOptions) (*ActivitiesPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *ActivitiesPageOptions) (*ActivitiesPageResponse, error)
- type ClientProperties
- type CreateActivityInput
- type CreateActivityResponse
- type PageActivityResponse
- type PageMetaResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivitiesPage ¶
type ActivitiesPage struct { CurrentPage *ActivitiesPageResponse Error error // contains filtered or unexported fields }
ActivitiesPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageActivityResponse or error that is returned from the api call(s)
type ActivitiesPageOptions ¶
type ActivitiesPageOptions struct { PageSize *int Page *int PageToken *string FriendlyName *string Available *bool }
ActivitiesPageOptions defines the query options for the api operation
type ActivitiesPageResponse ¶
type ActivitiesPageResponse struct { Activities []PageActivityResponse `json:"activities"` Meta PageMetaResponse `json:"meta"` }
ActivitiesPageResponse defines the response fields for the activities page
type ActivitiesPaginator ¶
type ActivitiesPaginator struct { Page *ActivitiesPage Activities []PageActivityResponse // contains filtered or unexported fields }
ActivitiesPaginator defines the fields for makings paginated api calls Activities is an array of activities that have been returned from all of the page calls
func (*ActivitiesPaginator) CurrentPage ¶
func (p *ActivitiesPaginator) CurrentPage() *ActivitiesPageResponse
CurrentPage retrieves the results for the current page
func (*ActivitiesPaginator) Error ¶
func (p *ActivitiesPaginator) Error() error
Error retrieves the error returned from the page
func (*ActivitiesPaginator) Next ¶
func (p *ActivitiesPaginator) Next() bool
Next retrieves the next page of results. Next will return false when either an error occurs or there are no more pages to iterate Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (*ActivitiesPaginator) NextWithContext ¶
func (p *ActivitiesPaginator) NextWithContext(context context.Context) bool
NextWithContext retrieves the next page of results. NextWithContext will return false when either an error occurs or there are no more pages to iterate
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for managing activity resources See https://www.twilio.com/docs/taskrouter/api/activity for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the activities client
func (Client) Create ¶
func (c Client) Create(input *CreateActivityInput) (*CreateActivityResponse, error)
Create creates a new activity See https://www.twilio.com/docs/taskrouter/api/activity#create-an-activity-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (Client) CreateWithContext ¶
func (c Client) CreateWithContext(context context.Context, input *CreateActivityInput) (*CreateActivityResponse, error)
CreateWithContext creates a new activity See https://www.twilio.com/docs/taskrouter/api/activity#create-an-activity-resource for more details
func (*Client) NewActivitiesPaginator ¶
func (c *Client) NewActivitiesPaginator() *ActivitiesPaginator
NewActivitiesPaginator creates a new instance of the paginator for Page.
func (*Client) NewActivitiesPaginatorWithOptions ¶
func (c *Client) NewActivitiesPaginatorWithOptions(options *ActivitiesPageOptions) *ActivitiesPaginator
NewActivitiesPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *ActivitiesPageOptions) (*ActivitiesPageResponse, error)
Page retrieves a page of activities See https://www.twilio.com/docs/taskrouter/api/activity#read-multiple-activity-resources for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information
func (Client) PageWithContext ¶
func (c Client) PageWithContext(context context.Context, options *ActivitiesPageOptions) (*ActivitiesPageResponse, error)
PageWithContext retrieves a page of activities See https://www.twilio.com/docs/taskrouter/api/activity#read-multiple-activity-resources for more details
type ClientProperties ¶
type ClientProperties struct {
WorkspaceSid string
}
ClientProperties are the properties required to manage the activities resources
type CreateActivityInput ¶
type CreateActivityInput struct { Available *bool `form:"Available,omitempty"` FriendlyName string `validate:"required" form:"FriendlyName"` }
CreateActivityInput defines the input fields for creating a new activity resource
type CreateActivityResponse ¶
type CreateActivityResponse struct { AccountSid string `json:"account_sid"` Available bool `json:"available"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName string `json:"friendly_name"` Sid string `json:"sid"` URL string `json:"url"` WorkspaceSid string `json:"workspace_sid"` }
CreateActivityResponse defines the response fields for the created activity
type PageActivityResponse ¶
type PageActivityResponse struct { AccountSid string `json:"account_sid"` Available bool `json:"available"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName string `json:"friendly_name"` Sid string `json:"sid"` URL string `json:"url"` WorkspaceSid string `json:"workspace_sid"` }