channel

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

This is an autogenerated file. DO NOT MODIFY

This is an autogenerated file. DO NOT MODIFY

This is an autogenerated file. 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 a specific user channel resource 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 channel client

func (Client) Fetch

func (c Client) Fetch() (*FetchUserChannelResponse, error)

Fetch retrieves a user channel resource See https://www.twilio.com/docs/chat/rest/user-channel-resource#fetch-a-userchannel-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) FetchWithContext

func (c Client) FetchWithContext(context context.Context) (*FetchUserChannelResponse, error)

FetchWithContext retrieves a user channel resource See https://www.twilio.com/docs/chat/rest/user-channel-resource#fetch-a-userchannel-resource for more details

func (Client) Update

Update modifies a user channel resource See https://www.twilio.com/docs/chat/rest/user-channel-resource#set-the-notificationlevel for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) UpdateWithContext

func (c Client) UpdateWithContext(context context.Context, input *UpdateUserChannelInput) (*UpdateUserChannelResponse, error)

UpdateWithContext modifies a user channel resource See https://www.twilio.com/docs/chat/rest/user-channel-resource#set-the-notificationlevel for more details

type ClientProperties

type ClientProperties struct {
	ServiceSid string
	Sid        string
	UserSid    string
}

ClientProperties are the properties required to manage the channel resources

type FetchUserChannelResponse

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

FetchUserChannelResponse defines the response fields for the retrieved user channel

type UpdateUserChannelInput

type UpdateUserChannelInput struct {
	LastConsumedMessageIndex *int       `form:"LastConsumedMessageIndex,omitempty"`
	LastConsumptionTimestamp *time.Time `form:"LastConsumptionTimestamp,omitempty"`
	NotificationLevel        *string    `form:"NotificationLevel,omitempty"`
}

UpdateUserChannelInput defines input fields for updating a user channel resource

type UpdateUserChannelResponse

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

UpdateUserChannelResponse defines the response fields for the updated user channel

Jump to

Keyboard shortcuts

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