openapi

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 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.43.1
  • 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 unique string that we created to identify the Channel resource.
	Sid *string `json:"sid,omitempty"`
	// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Channel resource.
	AccountSid *string `json:"account_sid,omitempty"`
	// The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) the Channel resource is associated with.
	ServiceSid *string `json:"service_sid,omitempty"`
	// The string that you assigned to describe the resource.
	FriendlyName *string `json:"friendly_name,omitempty"`
	// An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL.
	UniqueName *string `json:"unique_name,omitempty"`
	// The JSON string that stores application-specific data. If attributes have not been set, `{}` is returned.
	Attributes *string `json:"attributes,omitempty"`
	Type       *string `json:"type,omitempty"`
	// The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
	DateCreated *time.Time `json:"date_created,omitempty"`
	// The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
	DateUpdated *time.Time `json:"date_updated,omitempty"`
	// The `identity` of the User that created the channel. If the Channel was created by using the API, the value is `system`.
	CreatedBy *string `json:"created_by,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](https://www.twilio.com/docs/sms/services/api) this channel belongs to.
	MessagingServiceSid *string `json:"messaging_service_sid,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"`
	//
	Type *string `json:"Type,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"`
}

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