openapi

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 5 Imported by: 0

README

Go API client for openapi

This is the public Twilio REST API.

Overview

This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/twilio-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.28.2
  • Package version: 1.0.0
  • Build package: com.twilio.oai.TwilioGoGenerator For more information, please visit https://support.twilio.com

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import "./openapi"

Documentation for API Endpoints

All URIs are relative to https://chat.twilio.com

Class Method HTTP request Description
ServicesChannelsApi UpdateChannel Post /v3/Services/{ServiceSid}/Channels/{Sid}

Documentation For Models

Documentation For Authorization

accountSid_authToken

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiService

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

func NewApiService

func NewApiService(requestHandler *twilio.RequestHandler) *ApiService

func NewApiServiceWithClient

func NewApiServiceWithClient(client twilio.BaseClient) *ApiService

func (*ApiService) UpdateChannel

func (c *ApiService) UpdateChannel(ServiceSid string, Sid string, params *UpdateChannelParams) (*ChatV3Channel, error)

Update a specific Channel.

type ChatV3Channel

type ChatV3Channel struct {
	// The SID of the Account that created the resource
	AccountSid *string `json:"account_sid,omitempty"`
	// The JSON string that stores application-specific data
	Attributes *string `json:"attributes,omitempty"`
	// The identity of the User that created the channel
	CreatedBy *string `json:"created_by,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was created
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The ISO 8601 date and time in GMT when the resource was last updated
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The string that you assigned to describe the resource
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The number of Members in the Channel
	MembersCount *int `json:"members_count,omitempty"`
	// The number of Messages that have been passed in the Channel
	MessagesCount *int `json:"messages_count,omitempty"`
	// The unique ID of the Messaging Service this channel belongs to.
	MessagingServiceSid *string `json:"messaging_service_sid,omitempty"`
	// The SID of the Service that the resource is associated with
	ServiceSid *string `json:"service_sid,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// The visibility of the channel. Can be: `public` or `private`
	Type *string `json:"type,omitempty"`
	// An application-defined string that uniquely identifies the resource
	UniqueName *string `json:"unique_name,omitempty"`
	// The absolute URL of the Channel resource
	Url *string `json:"url,omitempty"`
}

ChatV3Channel struct for ChatV3Channel

type UpdateChannelParams

type UpdateChannelParams struct {
	// The X-Twilio-Webhook-Enabled HTTP request header
	XTwilioWebhookEnabled *string `json:"X-Twilio-Webhook-Enabled,omitempty"`
	// The unique ID of the [Messaging Service](https://www.twilio.com/docs/sms/services/api) this channel belongs to.
	MessagingServiceSid *string `json:"MessagingServiceSid,omitempty"`
	// TThe Type for this Channel to migrate to. Can only be `private`. Migration to 'public' is not allowed.
	Type *string `json:"Type,omitempty"`
}

Optional parameters for the method 'UpdateChannel'

func (*UpdateChannelParams) SetMessagingServiceSid

func (params *UpdateChannelParams) SetMessagingServiceSid(MessagingServiceSid string) *UpdateChannelParams

func (*UpdateChannelParams) SetType

func (params *UpdateChannelParams) SetType(Type string) *UpdateChannelParams

func (*UpdateChannelParams) SetXTwilioWebhookEnabled

func (params *UpdateChannelParams) SetXTwilioWebhookEnabled(XTwilioWebhookEnabled string) *UpdateChannelParams

Jump to

Keyboard shortcuts

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