channels

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package channels contains auto-generated files. DO NOT MODIFY

Package channels 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 user channel resources See https://www.twilio.com/docs/chat/rest/user-channel-resource for more details

func New

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

New creates a new instance of the channels client

func (*Client) NewUserChannelsPaginator

func (c *Client) NewUserChannelsPaginator() *UserChannelsPaginator

NewUserChannelsPaginator creates a new instance of the paginator for Page.

func (*Client) NewUserChannelsPaginatorWithOptions

func (c *Client) NewUserChannelsPaginatorWithOptions(options *UserChannelsPageOptions) *UserChannelsPaginator

NewUserChannelsPaginatorWithOptions creates a new instance of the paginator for Page with options.

func (Client) Page

Page retrieves a page of user channels See https://www.twilio.com/docs/chat/rest/user-channel-resource#read-multiple-userchannel-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 *UserChannelsPageOptions) (*UserChannelsPageResponse, error)

PageWithContext retrieves a page of user channels See https://www.twilio.com/docs/chat/rest/user-channel-resource#read-multiple-userchannel-resources for more details

type ClientProperties

type ClientProperties struct {
	ServiceSid string
	UserSid    string
}

ClientProperties are the properties required to manage the channels resources

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

type PageUserChannelResponse

type PageUserChannelResponse struct {
	AccountSid               string  `json:"account_sid"`
	ChannelSid               string  `json:"channel_sid"`
	LastConsumedMessageIndex *int    `json:"last_consumed_message_index,omitempty"`
	MemberSid                string  `json:"member_sid"`
	NotificationLevel        *string `json:"notification_level,omitempty"`
	ServiceSid               string  `json:"service_sid"`
	Status                   string  `json:"status"`
	URL                      string  `json:"url"`
	UnreadMessagesCount      *int    `json:"unread_messages_count,omitempty"`
	UserSid                  string  `json:"user_sid"`
}

type UserChannelsPage

type UserChannelsPage struct {
	CurrentPage *UserChannelsPageResponse
	Error       error
	// contains filtered or unexported fields
}

UserChannelsPage defines the fields for the page The CurrentPage and Error fields can be used to access the PageUserChannelResponse or error that is returned from the api call(s)

type UserChannelsPageOptions

type UserChannelsPageOptions struct {
	PageSize  *int
	Page      *int
	PageToken *string
}

UserChannelsPageOptions defines the query options for the api operation

type UserChannelsPageResponse

type UserChannelsPageResponse struct {
	Channels []PageUserChannelResponse `json:"channels"`
	Meta     PageMetaResponse          `json:"meta"`
}

UserChannelsPageResponse defines the response fields for the user channels page

type UserChannelsPaginator

type UserChannelsPaginator struct {
	Page     *UserChannelsPage
	Channels []PageUserChannelResponse
	// contains filtered or unexported fields
}

UserChannelsPaginator defines the fields for makings paginated api calls Channels is an array of channels that have been returned from all of the page calls

func (*UserChannelsPaginator) CurrentPage

CurrentPage retrieves the results for the current page

func (*UserChannelsPaginator) Error

func (p *UserChannelsPaginator) Error() error

Error retrieves the error returned from the page

func (*UserChannelsPaginator) Next

func (p *UserChannelsPaginator) 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 (*UserChannelsPaginator) NextWithContext

func (p *UserChannelsPaginator) 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

Jump to

Keyboard shortcuts

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