members

package
v0.15.0 Latest Latest
Warning

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

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

Documentation

Overview

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 Client

type Client struct {
	// contains filtered or unexported fields
}

Client for managing member resources See https://www.twilio.com/docs/voice/api/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) NewMembersPaginator

func (c *Client) NewMembersPaginator() *MembersPaginator

NewMembersPaginator creates a new instance of the paginator for Page.

func (*Client) NewMembersPaginatorWithOptions

func (c *Client) NewMembersPaginatorWithOptions(options *MembersPageOptions) *MembersPaginator

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

func (Client) Page

func (c Client) Page(options *MembersPageOptions) (*MembersPageResponse, error)

Page retrieves a page of members See https://www.twilio.com/docs/voice/api/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 *MembersPageOptions) (*MembersPageResponse, error)

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

type ClientProperties

type ClientProperties struct {
	AccountSid string
	QueueSid   string
}

ClientProperties are the properties required to manage the members resources

type MembersPage

type MembersPage struct {
	CurrentPage *MembersPageResponse
	Error       error
	// contains filtered or unexported fields
}

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

type MembersPageOptions

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

MembersPageOptions defines the query options for the api operation

type MembersPageResponse

type MembersPageResponse struct {
	End             int                  `json:"end"`
	FirstPageURI    string               `json:"first_page_uri"`
	Members         []PageMemberResponse `json:"queue_members"`
	NextPageURI     *string              `json:"next_page_uri,omitempty"`
	Page            int                  `json:"page"`
	PageSize        int                  `json:"page_size"`
	PreviousPageURI *string              `json:"previous_page_uri,omitempty"`
	Start           int                  `json:"start"`
	URI             string               `json:"uri"`
}

MembersPageResponse defines the response fields for the member page

type MembersPaginator

type MembersPaginator struct {
	Page    *MembersPage
	Members []PageMemberResponse
	// contains filtered or unexported fields
}

MembersPaginator 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 (*MembersPaginator) CurrentPage

func (p *MembersPaginator) CurrentPage() *MembersPageResponse

CurrentPage retrieves the results for the current page

func (*MembersPaginator) Error

func (p *MembersPaginator) Error() error

Error retrieves the error returned from the page

func (*MembersPaginator) Next

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

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

type PageMemberResponse struct {
	CallSid      string            `json:"call_sid"`
	DateEnqueued utils.RFC2822Time `json:"date_enqueued"`
	Position     int               `json:"position"`
	QueueSid     string            `json:"queue_sid"`
	WaitTime     int               `json:"wait_time"`
}

Jump to

Keyboard shortcuts

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