members

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package members contains auto-generated files. DO NOT MODIFY

Package members contains auto-generated files. DO NOT MODIFY

Package members 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 ChannelMembersPage

type ChannelMembersPage struct {
	CurrentPage *ChannelMembersPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type ChannelMembersPageOptions

type ChannelMembersPageOptions struct {
	Identity  *[]string
	PageSize  *int
	Page      *int
	PageToken *string
}

ChannelMembersPageOptions defines the query options for the api operation

type ChannelMembersPageResponse

type ChannelMembersPageResponse struct {
	Members []PageChannelMemberResponse `json:"members"`
	Meta    PageMetaResponse            `json:"meta"`
}

ChannelMembersPageResponse defines the response fields for the channel members page

type ChannelMembersPaginator

type ChannelMembersPaginator struct {
	Page    *ChannelMembersPage
	Members []PageChannelMemberResponse
	// contains filtered or unexported fields
}

ChannelMembersPaginator defines the fields for makings paginated api calls Members is an array of members that have been returned from all of the page calls

func (*ChannelMembersPaginator) CurrentPage

CurrentPage retrieves the results for the current page

func (*ChannelMembersPaginator) Error

func (p *ChannelMembersPaginator) Error() error

Error retrieves the error returned from the page

func (*ChannelMembersPaginator) Next

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

func (p *ChannelMembersPaginator) 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 member resources See https://www.twilio.com/docs/chat/rest/member-resource for more details

func New

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

New creates a new instance of the members client

func (Client) Create

Create creates a new member See https://www.twilio.com/docs/chat/rest/member-resource#create-a-member-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 *CreateChannelMemberInput) (*CreateChannelMemberResponse, error)

CreateWithContext creates a new member See https://www.twilio.com/docs/chat/rest/member-resource#create-a-member-resource for more details

func (*Client) NewChannelMembersPaginator

func (c *Client) NewChannelMembersPaginator() *ChannelMembersPaginator

NewChannelMembersPaginator creates a new instance of the paginator for Page.

func (*Client) NewChannelMembersPaginatorWithOptions

func (c *Client) NewChannelMembersPaginatorWithOptions(options *ChannelMembersPageOptions) *ChannelMembersPaginator

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

func (Client) Page

Page retrieves a page of channel members See https://www.twilio.com/docs/chat/rest/member-resource#read-multiple-member-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 *ChannelMembersPageOptions) (*ChannelMembersPageResponse, error)

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

type ClientProperties

type ClientProperties struct {
	ChannelSid string
	ServiceSid string
}

ClientProperties are the properties required to manage the members resources

type CreateChannelMemberInput

type CreateChannelMemberInput struct {
	Attributes               *string    `form:"Attributes,omitempty"`
	DateCreated              *time.Time `form:"DateCreated,omitempty"`
	DateUpdated              *time.Time `form:"DateUpdated,omitempty"`
	Identity                 string     `validate:"required" form:"Identity"`
	LastConsumedMessageIndex *int       `form:"LastConsumedMessageIndex,omitempty"`
	LastConsumptionTimestamp *time.Time `form:"LastConsumptionTimestamp,omitempty"`
	RoleSid                  *string    `form:"RoleSid,omitempty"`
}

CreateChannelMemberInput defines the input fields for creating a new member resource

type CreateChannelMemberResponse

type CreateChannelMemberResponse struct {
	AccountSid               string     `json:"account_sid"`
	Attributes               *string    `json:"attributes,omitempty"`
	ChannelSid               string     `json:"channel_sid"`
	DateCreated              time.Time  `json:"date_created"`
	DateUpdated              *time.Time `json:"date_updated,omitempty"`
	Identity                 string     `json:"identity"`
	LastConsumedMessageIndex *int       `json:"last_consumed_message_index,omitempty"`
	LastConsumedTimestamp    *time.Time `json:"last_consumption_timestamp,omitempty"`
	RoleSid                  *string    `json:"role_sid,omitempty"`
	ServiceSid               string     `json:"service_sid"`
	Sid                      string     `json:"sid"`
	URL                      string     `json:"url"`
}

CreateChannelMemberResponse defines the response fields for the created member

type PageChannelMemberResponse

type PageChannelMemberResponse struct {
	AccountSid               string     `json:"account_sid"`
	Attributes               *string    `json:"attributes,omitempty"`
	ChannelSid               string     `json:"channel_sid"`
	DateCreated              time.Time  `json:"date_created"`
	DateUpdated              *time.Time `json:"date_updated,omitempty"`
	Identity                 string     `json:"identity"`
	LastConsumedMessageIndex *int       `json:"last_consumed_message_index,omitempty"`
	LastConsumedTimestamp    *time.Time `json:"last_consumption_timestamp,omitempty"`
	RoleSid                  *string    `json:"role_sid,omitempty"`
	ServiceSid               string     `json:"service_sid"`
	Sid                      string     `json:"sid"`
	URL                      string     `json:"url"`
}

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