media_attachments

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package media_attachments contains auto-generated files. DO NOT MODIFY

Package media_attachments contains auto-generated files. DO NOT MODIFY

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for managing message media attachments resources See https://www.twilio.com/docs/sms/api/media-resource for more details

func New

func New(client *client.Client, properties ClientProperties) *Client

New creates a new instance of the media attachments client

func (*Client) NewMediaPaginator

func (c *Client) NewMediaPaginator() *MediaPaginator

NewMediaPaginator creates a new instance of the paginator for Page.

func (*Client) NewMediaPaginatorWithOptions

func (c *Client) NewMediaPaginatorWithOptions(options *MediaPageOptions) *MediaPaginator

NewMediaPaginatorWithOptions creates a new instance of the paginator for Page with options.

func (Client) Page

func (c Client) Page(options *MediaPageOptions) (*MediaPageResponse, error)

Page retrieves a page of message media attachments See https://www.twilio.com/docs/sms/api/media-resource#read-multiple-media-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 *MediaPageOptions) (*MediaPageResponse, error)

PageWithContext retrieves a page of message media attachments See https://www.twilio.com/docs/sms/api/media-resource#read-multiple-media-resources for more details

type ClientProperties

type ClientProperties struct {
	AccountSid string
	MessageSid string
}

ClientProperties are the properties required to manage the media attachments resources

type MediaPage

type MediaPage struct {
	CurrentPage *MediaPageResponse
	Error       error
	// contains filtered or unexported fields
}

MediaPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageMediaResponse or error that is returned from the api call(s)

type MediaPageOptions

type MediaPageOptions struct {
	PageSize    *int
	Page        *int
	PageToken   *string
	DateCreated *string
}

MediaPageOptions defines the query options for the api operation

type MediaPageResponse

type MediaPageResponse struct {
	End             int                 `json:"end"`
	FirstPageURI    string              `json:"first_page_uri"`
	Media           []PageMediaResponse `json:"media"`
	NextPageURI     *string             `json:"next_page_uri,omitempty"`
	Page            int                 `json:"page"`
	PageSize        int                 `json:"page_size"`
	PreviousPageURI *string             `json:"previous_page_uri,omitempty"`
	Start           int                 `json:"start"`
	URI             string              `json:"uri"`
}

MediaPageResponse defines the response fields for the message media attachments page

type MediaPaginator

type MediaPaginator struct {
	Page  *MediaPage
	Media []PageMediaResponse
	// contains filtered or unexported fields
}

MediaPaginator defines the fields for makings paginated api calls Media is an array of media that have been returned from all of the page calls

func (*MediaPaginator) CurrentPage

func (p *MediaPaginator) CurrentPage() *MediaPageResponse

CurrentPage retrieves the results for the current page

func (*MediaPaginator) Error

func (p *MediaPaginator) Error() error

Error retrieves the error returned from the page

func (*MediaPaginator) Next

func (p *MediaPaginator) 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 (*MediaPaginator) NextWithContext

func (p *MediaPaginator) 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 PageMediaResponse

type PageMediaResponse struct {
	AccountSid  string             `json:"account_sid"`
	ContentType string             `json:"content_type"`
	DateCreated utils.RFC2822Time  `json:"date_created"`
	DateUpdated *utils.RFC2822Time `json:"date_updated,omitempty"`
	ParentSid   string             `json:"parent_sid"`
	Sid         string             `json:"sid"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL