Documentation ¶
Overview ¶
Package documents contains auto-generated files. DO NOT MODIFY
Package documents contains auto-generated files. DO NOT MODIFY
Package documents contains auto-generated files. DO NOT MODIFY
Index ¶
- type Client
- func (c Client) Create(input *CreateDocumentInput) (*CreateDocumentResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateDocumentInput) (*CreateDocumentResponse, error)
- func (c *Client) NewDocumentsPaginator() *DocumentsPaginator
- func (c *Client) NewDocumentsPaginatorWithOptions(options *DocumentsPageOptions) *DocumentsPaginator
- func (c Client) Page(options *DocumentsPageOptions) (*DocumentsPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *DocumentsPageOptions) (*DocumentsPageResponse, error)
- type ClientProperties
- type CreateDocumentInput
- type CreateDocumentResponse
- type DocumentsPage
- type DocumentsPageOptions
- type DocumentsPageResponse
- type DocumentsPaginator
- type PageDocumentResponse
- type PageMetaResponse
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 document resources See https://www.twilio.com/docs/sync/api/document-resource for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the documents client
func (Client) Create ¶
func (c Client) Create(input *CreateDocumentInput) (*CreateDocumentResponse, error)
Create creates a new document See https://www.twilio.com/docs/sync/api/document-resource#create-a-document-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 *CreateDocumentInput) (*CreateDocumentResponse, error)
CreateWithContext creates a new document See https://www.twilio.com/docs/sync/api/document-resource#create-a-document-resource for more details
func (*Client) NewDocumentsPaginator ¶
func (c *Client) NewDocumentsPaginator() *DocumentsPaginator
NewDocumentsPaginator creates a new instance of the paginator for Page.
func (*Client) NewDocumentsPaginatorWithOptions ¶
func (c *Client) NewDocumentsPaginatorWithOptions(options *DocumentsPageOptions) *DocumentsPaginator
NewDocumentsPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *DocumentsPageOptions) (*DocumentsPageResponse, error)
Page retrieves a page of documents See https://www.twilio.com/docs/sync/api/document-resource#read-multiple-document-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 *DocumentsPageOptions) (*DocumentsPageResponse, error)
PageWithContext retrieves a page of documents See https://www.twilio.com/docs/sync/api/document-resource#read-multiple-document-resources for more details
type ClientProperties ¶
type ClientProperties struct {
ServiceSid string
}
ClientProperties are the properties required to manage the documents resources
type CreateDocumentInput ¶
type CreateDocumentInput struct { Data *string `form:"Data,omitempty"` Ttl *int `form:"Ttl,omitempty"` UniqueName *string `form:"UniqueName,omitempty"` }
CreateDocumentInput defines the input fields for creating a new document resource
type CreateDocumentResponse ¶
type CreateDocumentResponse struct { AccountSid string `json:"account_sid"` CreatedBy string `json:"created_by"` Data map[string]interface{} `json:"data"` DateCreated time.Time `json:"date_created"` DateExpires *time.Time `json:"date_expires,omitempty"` DateUpdated *time.Time `json:"date_updated,omitempty"` Revision string `json:"revision"` ServiceSid string `json:"service_Sid"` Sid string `json:"sid"` URL string `json:"url"` UniqueName *string `json:"unique_name,omitempty"` }
CreateDocumentResponse defines the response fields for the created document
type DocumentsPage ¶
type DocumentsPage struct { CurrentPage *DocumentsPageResponse Error error // contains filtered or unexported fields }
DocumentsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageDocumentResponse or error that is returned from the api call(s)
type DocumentsPageOptions ¶
DocumentsPageOptions defines the query options for the api operation
type DocumentsPageResponse ¶
type DocumentsPageResponse struct { Documents []PageDocumentResponse `json:"documents"` Meta PageMetaResponse `json:"meta"` }
DocumentsPageResponse defines the response fields for the documents page
type DocumentsPaginator ¶
type DocumentsPaginator struct { Page *DocumentsPage Documents []PageDocumentResponse // contains filtered or unexported fields }
DocumentsPaginator defines the fields for makings paginated api calls Documents is an array of documents that have been returned from all of the page calls
func (*DocumentsPaginator) CurrentPage ¶
func (p *DocumentsPaginator) CurrentPage() *DocumentsPageResponse
CurrentPage retrieves the results for the current page
func (*DocumentsPaginator) Error ¶
func (p *DocumentsPaginator) Error() error
Error retrieves the error returned from the page
func (*DocumentsPaginator) Next ¶
func (p *DocumentsPaginator) 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 (*DocumentsPaginator) NextWithContext ¶
func (p *DocumentsPaginator) 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 PageDocumentResponse ¶
type PageDocumentResponse struct { AccountSid string `json:"account_sid"` CreatedBy string `json:"created_by"` Data map[string]interface{} `json:"data"` DateCreated time.Time `json:"date_created"` DateExpires *time.Time `json:"date_expires,omitempty"` DateUpdated *time.Time `json:"date_updated,omitempty"` Revision string `json:"revision"` ServiceSid string `json:"service_Sid"` Sid string `json:"sid"` URL string `json:"url"` UniqueName *string `json:"unique_name,omitempty"` }