Documentation
¶
Overview ¶
Package assets contains auto-generated files. DO NOT MODIFY
Package assets contains auto-generated files. DO NOT MODIFY
Package assets contains auto-generated files. DO NOT MODIFY
Index ¶
- type AssetsPage
- type AssetsPageOptions
- type AssetsPageResponse
- type AssetsPaginator
- type Client
- func (c Client) Create(input *CreateAssetInput) (*CreateAssetResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateAssetInput) (*CreateAssetResponse, error)
- func (c *Client) NewAssetsPaginator() *AssetsPaginator
- func (c *Client) NewAssetsPaginatorWithOptions(options *AssetsPageOptions) *AssetsPaginator
- func (c Client) Page(options *AssetsPageOptions) (*AssetsPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *AssetsPageOptions) (*AssetsPageResponse, error)
- type ClientProperties
- type CreateAssetInput
- type CreateAssetResponse
- type PageAssetResponse
- type PageMetaResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetsPage ¶
type AssetsPage struct { CurrentPage *AssetsPageResponse Error error // contains filtered or unexported fields }
AssetsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageAssetResponse or error that is returned from the api call(s)
type AssetsPageOptions ¶
AssetsPageOptions defines the query options for the api operation
type AssetsPageResponse ¶
type AssetsPageResponse struct { Assets []PageAssetResponse `json:"assets"` Meta PageMetaResponse `json:"meta"` }
AssetsPageResponse defines the response fields for the assets page
type AssetsPaginator ¶
type AssetsPaginator struct { Page *AssetsPage Assets []PageAssetResponse // contains filtered or unexported fields }
AssetsPaginator defines the fields for makings paginated api calls Assets is an array of assets that have been returned from all of the page calls
func (*AssetsPaginator) CurrentPage ¶
func (p *AssetsPaginator) CurrentPage() *AssetsPageResponse
CurrentPage retrieves the results for the current page
func (*AssetsPaginator) Error ¶
func (p *AssetsPaginator) Error() error
Error retrieves the error returned from the page
func (*AssetsPaginator) Next ¶
func (p *AssetsPaginator) 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 (*AssetsPaginator) NextWithContext ¶
func (p *AssetsPaginator) 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 asset resources See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the assets client
func (Client) Create ¶
func (c Client) Create(input *CreateAssetInput) (*CreateAssetResponse, error)
Create creates a new asset See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset#create-an-asset-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 *CreateAssetInput) (*CreateAssetResponse, error)
CreateWithContext creates a new asset See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset#create-an-asset-resource for more details
func (*Client) NewAssetsPaginator ¶
func (c *Client) NewAssetsPaginator() *AssetsPaginator
NewAssetsPaginator creates a new instance of the paginator for Page.
func (*Client) NewAssetsPaginatorWithOptions ¶
func (c *Client) NewAssetsPaginatorWithOptions(options *AssetsPageOptions) *AssetsPaginator
NewAssetsPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *AssetsPageOptions) (*AssetsPageResponse, error)
Page retrieves a page of assets See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset#read-multiple-asset-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 *AssetsPageOptions) (*AssetsPageResponse, error)
PageWithContext retrieves a page of assets See https://www.twilio.com/docs/runtime/functions-assets-api/api/asset#read-multiple-asset-resources for more details
type ClientProperties ¶
type ClientProperties struct {
ServiceSid string
}
ClientProperties are the properties required to manage the assets resources
type CreateAssetInput ¶
type CreateAssetInput struct {
FriendlyName string `validate:"required" form:"FriendlyName"`
}
CreateAssetInput defines the input fields for creating a new asset resource
type CreateAssetResponse ¶
type CreateAssetResponse struct { AccountSid string `json:"account_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName string `json:"friendly_name"` ServiceSid string `json:"service_sid"` Sid string `json:"sid"` URL string `json:"url"` }
CreateAssetResponse defines the response fields for the created asset
type PageAssetResponse ¶
type PageAssetResponse struct { AccountSid string `json:"account_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` FriendlyName string `json:"friendly_name"` ServiceSid string `json:"service_sid"` Sid string `json:"sid"` URL string `json:"url"` }