media_files

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package media_files contains auto-generated files. DO NOT MODIFY

Package media_files 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 media resources See https://www.twilio.com/docs/fax/api/fax-media-resource for more details

func New

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

New creates a new instance of the media files 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 fax media files See https://www.twilio.com/docs/fax/api/fax-media-resource#read-multiple-fax-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 fax media files See https://www.twilio.com/docs/fax/api/fax-media-resource#read-multiple-fax-media-resources for more details

type ClientProperties

type ClientProperties struct {
	FaxSid string
}

ClientProperties are the properties required to manage the media files 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
}

MediaPageOptions defines the query options for the api operation

type MediaPageResponse

type MediaPageResponse struct {
	Media []PageMediaResponse `json:"media"`
	Meta  PageMetaResponse    `json:"meta"`
}

MediaPageResponse defines the response fields for the fax media 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 time.Time  `json:"date_created"`
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	FaxSid      string     `json:"fax_sid"`
	Sid         string     `json:"sid"`
	URL         string     `json:"url"`
}

type PageMetaResponse

type PageMetaResponse struct {
	FirstPageURL    string  `json:"first_page_url"`
	Key             string  `json:"key"`
	NextPageURL     *string `json:"next_page_url,omitempty"`
	Page            int     `json:"page"`
	PageSize        int     `json:"page_size"`
	PreviousPageURL *string `json:"previous_page_url,omitempty"`
	URL             string  `json:"url"`
}

Jump to

Keyboard shortcuts

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