messages

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 7 Imported by: 2

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

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

type ChannelMessagesPageOptions struct {
	Order     *string
	PageSize  *int
	Page      *int
	PageToken *string
}

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

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

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

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

type ClientProperties struct {
	ChannelSid string
	ServiceSid string
}

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"`
}

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