message

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Overview

Package message contains auto-generated files. DO NOT MODIFY

Package message contains auto-generated files. DO NOT MODIFY

Package message contains auto-generated files. DO NOT MODIFY

Package message 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 a specific message resource 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 message client

func (Client) Delete

func (c Client) Delete() error

Delete removes a message resource from the account See https://www.twilio.com/docs/chat/rest/message-resource#delete-a-message-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) DeleteWithContext

func (c Client) DeleteWithContext(context context.Context) error

DeleteWithContext removes a message resource from the account See https://www.twilio.com/docs/chat/rest/message-resource#delete-a-message-resource for more details

func (Client) Fetch

Fetch retrieves a message resource See https://www.twilio.com/docs/chat/rest/message-resource#fetch-a-message-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) (*FetchChannelMessageResponse, error)

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

func (Client) Update

Update modifies a message resource See https://www.twilio.com/docs/chat/rest/message-resource#update-a-message-resource 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 *UpdateChannelMessageInput) (*UpdateChannelMessageResponse, error)

UpdateWithContext modifies a message resource See https://www.twilio.com/docs/chat/rest/message-resource#update-a-message-resource for more details

type ClientProperties

type ClientProperties struct {
	ChannelSid string
	ServiceSid string
	Sid        string
}

ClientProperties are the properties required to manage the message resources

type FetchChannelMessageMediaResponse added in v0.6.0

type FetchChannelMessageMediaResponse struct {
	ContentType string `json:"content_type"`
	FileName    string `json:"filename"`
	Sid         string `json:"sid"`
	Size        int    `json:"size"`
}

type FetchChannelMessageResponse

type FetchChannelMessageResponse 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         *FetchChannelMessageMediaResponse `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"`
}

FetchChannelMessageResponse defines the response fields for the retrieved message

type UpdateChannelMessageInput

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

UpdateChannelMessageInput defines input fields for updating a message resource

type UpdateChannelMessageMediaResponse added in v0.6.0

type UpdateChannelMessageMediaResponse struct {
	ContentType string `json:"content_type"`
	FileName    string `json:"filename"`
	Sid         string `json:"sid"`
	Size        int    `json:"size"`
}

type UpdateChannelMessageResponse

type UpdateChannelMessageResponse 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         *UpdateChannelMessageMediaResponse `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"`
}

UpdateChannelMessageResponse defines the response fields for the updated message

Jump to

Keyboard shortcuts

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