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 Client
- func (c Client) Create(input *CreateMessageInput) (*CreateMessageResponse, error)
- func (c Client) CreateWithContext(context context.Context, input *CreateMessageInput) (*CreateMessageResponse, error)
- func (c *Client) NewMessagesPaginator() *MessagesPaginator
- func (c *Client) NewMessagesPaginatorWithOptions(options *MessagesPageOptions) *MessagesPaginator
- func (c Client) Page(options *MessagesPageOptions) (*MessagesPageResponse, error)
- func (c Client) PageWithContext(context context.Context, options *MessagesPageOptions) (*MessagesPageResponse, error)
- type ClientProperties
- type CreateMessageDeliveryResponse
- type CreateMessageInput
- type CreateMessageMediaResponse
- type CreateMessageResponse
- type MessagesPage
- type MessagesPageOptions
- type MessagesPageResponse
- type MessagesPaginator
- type PageMessageDeliveryResponse
- type PageMessageMediaResponse
- type PageMessageResponse
- 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 message resources See https://www.twilio.com/docs/conversations/api/conversation-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 *CreateMessageInput) (*CreateMessageResponse, error)
Create creates a new message See https://www.twilio.com/docs/conversations/api/conversation-message-resource#create-a-conversationmessage-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 *CreateMessageInput) (*CreateMessageResponse, error)
CreateWithContext creates a new message See https://www.twilio.com/docs/conversations/api/conversation-message-resource#create-a-conversationmessage-resource for more details
func (*Client) NewMessagesPaginator ¶
func (c *Client) NewMessagesPaginator() *MessagesPaginator
NewMessagesPaginator creates a new instance of the paginator for Page.
func (*Client) NewMessagesPaginatorWithOptions ¶
func (c *Client) NewMessagesPaginatorWithOptions(options *MessagesPageOptions) *MessagesPaginator
NewMessagesPaginatorWithOptions creates a new instance of the paginator for Page with options.
func (Client) Page ¶
func (c Client) Page(options *MessagesPageOptions) (*MessagesPageResponse, error)
Page retrieves a page of messages See https://www.twilio.com/docs/conversations/api/conversation-message-resource#list-all-conversation-messages 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 *MessagesPageOptions) (*MessagesPageResponse, error)
PageWithContext retrieves a page of messages See https://www.twilio.com/docs/conversations/api/conversation-message-resource#list-all-conversation-messages for more details
type ClientProperties ¶
ClientProperties are the properties required to manage the messages resources
type CreateMessageInput ¶
type CreateMessageInput struct { Attributes *string `form:"Attributes,omitempty"` Author *string `form:"Author,omitempty"` Body *string `form:"Body,omitempty"` DateCreated *utils.RFC2822Time `form:"DateCreated,omitempty"` DateUpdated *utils.RFC2822Time `form:"DateUpdated,omitempty"` MediaSid *string `form:"MediaSid,omitempty"` }
CreateMessageInput defines the input fields for creating a new message resource
type CreateMessageResponse ¶
type CreateMessageResponse struct { AccountSid string `json:"account_sid"` Attributes string `json:"attributes"` Author string `json:"author"` Body *string `json:"body,omitempty"` ChatServiceSid string `json:"chat_service_sid"` ConversationSid string `json:"conversation_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` Delivery *CreateMessageDeliveryResponse `json:"delivery,omitempty"` Index int `json:"index"` Media *[]CreateMessageMediaResponse `json:"media,omitempty"` ParticipantSid *string `json:"participant_sid,omitempty"` Sid string `json:"sid"` URL string `json:"url"` }
CreateMessageResponse defines the response fields for the created message
type MessagesPage ¶
type MessagesPage struct { CurrentPage *MessagesPageResponse Error error // contains filtered or unexported fields }
MessagesPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageMessageResponse or error that is returned from the api call(s)
type MessagesPageOptions ¶
MessagesPageOptions defines the query options for the api operation
type MessagesPageResponse ¶
type MessagesPageResponse struct { Messages []PageMessageResponse `json:"messages"` Meta PageMetaResponse `json:"meta"` }
MessagesPageResponse defines the response fields for the messages page
type MessagesPaginator ¶
type MessagesPaginator struct { Page *MessagesPage Messages []PageMessageResponse // contains filtered or unexported fields }
MessagesPaginator 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 (*MessagesPaginator) CurrentPage ¶
func (p *MessagesPaginator) CurrentPage() *MessagesPageResponse
CurrentPage retrieves the results for the current page
func (*MessagesPaginator) Error ¶
func (p *MessagesPaginator) Error() error
Error retrieves the error returned from the page
func (*MessagesPaginator) Next ¶
func (p *MessagesPaginator) 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 (*MessagesPaginator) NextWithContext ¶
func (p *MessagesPaginator) 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 PageMessageResponse ¶
type PageMessageResponse struct { AccountSid string `json:"account_sid"` Attributes string `json:"attributes"` Author string `json:"author"` Body *string `json:"body,omitempty"` ChatServiceSid string `json:"chat_service_sid"` ConversationSid string `json:"conversation_sid"` DateCreated time.Time `json:"date_created"` DateUpdated *time.Time `json:"date_updated,omitempty"` Delivery *PageMessageDeliveryResponse `json:"delivery,omitempty"` Index int `json:"index"` Media *[]PageMessageMediaResponse `json:"media,omitempty"` ParticipantSid *string `json:"participant_sid,omitempty"` Sid string `json:"sid"` URL string `json:"url"` }