Documentation ¶
Overview ¶
Package messages contains auto-generated files. DO NOT MODIFY
Package messages contains auto-generated files. DO NOT MODIFY
Package messages contains auto-generated files. DO NOT MODIFY
Index ¶
- type ChannelMessagesPage
- type ChannelMessagesPageOptions
- type ChannelMessagesPageResponse
- type ChannelMessagesPaginator
- type Client
- func (c Client) Create(input *CreateChannelMessageInput) (*CreateChannelMessageResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateChannelMessageInput) (*CreateChannelMessageResponse, error)
- func (c *Client) NewChannelMessagesPaginator() *ChannelMessagesPaginator
- func (c *Client) NewChannelMessagesPaginatorWithOptions(options *ChannelMessagesPageOptions) *ChannelMessagesPaginator
- func (c Client) Page(options *ChannelMessagesPageOptions) (*ChannelMessagesPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *ChannelMessagesPageOptions) (*ChannelMessagesPageResponse, error)
- type ClientProperties
- type CreateChannelMessageInput
- type CreateChannelMessageResponse
- type PageChannelMessageResponse
- type PageMetaResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelMessagesPage ¶
type ChannelMessagesPage struct { CurrentPage *ChannelMessagesPageResponse Error error // contains filtered or unexported fields }
ChannelMessagesPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageChannelMessageResponse or error that is returned from the api call(s)
type ChannelMessagesPageOptions ¶
ChannelMessagesPageOptions defines the query options for the api operation
type ChannelMessagesPageResponse ¶
type ChannelMessagesPageResponse struct { Messages []PageChannelMessageResponse `json:"messages"` Meta PageMetaResponse `json:"meta"` }
ChannelMessagesPageResponse defines the response fields for the channel messages page
type ChannelMessagesPaginator ¶
type ChannelMessagesPaginator struct { Page *ChannelMessagesPage Messages []PageChannelMessageResponse // contains filtered or unexported fields }
ChannelMessagesPaginator defines the fields for makings paginated api calls Messages is an array of messages that have been returned from all of the page calls
func (*ChannelMessagesPaginator) CurrentPage ¶
func (p *ChannelMessagesPaginator) CurrentPage() *ChannelMessagesPageResponse
CurrentPage retrieves the results for the current page
func (*ChannelMessagesPaginator) Error ¶
func (p *ChannelMessagesPaginator) Error() error
Error retrieves the error returned from the page
func (*ChannelMessagesPaginator) Next ¶
func (p *ChannelMessagesPaginator) 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 (*ChannelMessagesPaginator) NextWithContext ¶
func (p *ChannelMessagesPaginator) 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 message resources See https://www.twilio.com/docs/chat/rest/message-resource for more details
func New ¶
func New(client *client.Client, properties ClientProperties) *Client
New creates a new instance of the messages client
func (Client) Create ¶
func (c Client) Create(input *CreateChannelMessageInput) (*CreateChannelMessageResponse, error)
Create creates a new message See https://www.twilio.com/docs/chat/rest/message-resource#create-a-message-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 *CreateChannelMessageInput) (*CreateChannelMessageResponse, error)
CreateWithContext creates a new message See https://www.twilio.com/docs/chat/rest/message-resource#create-a-message-resource for more details
func (*Client) NewChannelMessagesPaginator ¶
func (c *Client) NewChannelMessagesPaginator() *ChannelMessagesPaginator
NewChannelMessagesPaginator creates a new instance of the paginator for Page.
func (*Client) NewChannelMessagesPaginatorWithOptions ¶
func (c *Client) NewChannelMessagesPaginatorWithOptions(options *ChannelMessagesPageOptions) *ChannelMessagesPaginator
NewChannelMessagesPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *ChannelMessagesPageOptions) (*ChannelMessagesPageResponse, error)
Page retrieves a page of channel messages See https://www.twilio.com/docs/chat/rest/message-resource#read-multiple-message-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 *ChannelMessagesPageOptions) (*ChannelMessagesPageResponse, error)
PageWithContext retrieves a page of channel messages See https://www.twilio.com/docs/chat/rest/message-resource#read-multiple-message-resources for more details
type ClientProperties ¶
ClientProperties are the properties required to manage the messages resources
type CreateChannelMessageInput ¶
type CreateChannelMessageInput struct { Attributes *string `form:"Attributes,omitempty"` Body *string `form:"Body,omitempty"` DateCreated *time.Time `form:"DateCreated,omitempty"` DateUpdated *time.Time `form:"DateUpdated,omitempty"` From *string `form:"From,omitempty"` LastUpdatedBy *string `form:"LastUpdatedBy,omitempty"` MediaSid *string `form:"MediaSid,omitempty"` }
CreateChannelMessageInput defines the input fields for creating a new message resource
type CreateChannelMessageResponse ¶
type CreateChannelMessageResponse struct { AccountSid string `json:"account_sid"` Attributes *string `json:"attributes,omitempty"` Body *string `json:"body,omitempty"` ChannelSid string `json:"channel_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` From *string `json:"from,omitempty"` Index *int `json:"index,omitempty"` LastUpdatedBy *string `json:"last_updated_by,omitempty"` Media *map[string]interface{} `json:"media,omitempty"` ServiceSid string `json:"service_sid"` Sid string `json:"sid"` To *string `json:"to,omitempty"` Type *string `json:"type,omitempty"` URL string `json:"url"` WasEdited *bool `json:"was_edited,omitempty"` }
CreateChannelMessageResponse defines the response fields for the created message
type PageChannelMessageResponse ¶
type PageChannelMessageResponse struct { AccountSid string `json:"account_sid"` Attributes *string `json:"attributes,omitempty"` Body *string `json:"body,omitempty"` ChannelSid string `json:"channel_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` From *string `json:"from,omitempty"` Index *int `json:"index,omitempty"` LastUpdatedBy *string `json:"last_updated_by,omitempty"` Media *map[string]interface{} `json:"media,omitempty"` ServiceSid string `json:"service_sid"` Sid string `json:"sid"` To *string `json:"to,omitempty"` Type *string `json:"type,omitempty"` URL string `json:"url"` WasEdited *bool `json:"was_edited,omitempty"` }