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.55.3
- 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://flex-api.twilio.com
Class | Method | HTTP request | Description |
---|---|---|---|
WebChatsApi | CreateWebChannel | Post /v2/WebChats |
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 ¶
- type ApiService
- type CreateWebChannelParams
- func (params *CreateWebChannelParams) SetAddressSid(AddressSid string) *CreateWebChannelParams
- func (params *CreateWebChannelParams) SetChatFriendlyName(ChatFriendlyName string) *CreateWebChannelParams
- func (params *CreateWebChannelParams) SetCustomerFriendlyName(CustomerFriendlyName string) *CreateWebChannelParams
- func (params *CreateWebChannelParams) SetPreEngagementData(PreEngagementData string) *CreateWebChannelParams
- type FlexV2WebChannel
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) CreateWebChannel ¶
func (c *ApiService) CreateWebChannel(params *CreateWebChannelParams) (*FlexV2WebChannel, error)
type CreateWebChannelParams ¶
type CreateWebChannelParams struct { // The SID of the Conversations Address. See [Address Configuration Resource](https://www.twilio.com/docs/conversations/api/address-configuration-resource) for configuration details. When a conversation is created on the Flex backend, the callback URL will be set to the corresponding Studio Flow SID or webhook URL in your address configuration. AddressSid *string `json:"AddressSid,omitempty"` // The Conversation's friendly name. See the [Conversation resource](https://www.twilio.com/docs/conversations/api/conversation-resource) for an example. ChatFriendlyName *string `json:"ChatFriendlyName,omitempty"` // The Conversation participant's friendly name. See the [Conversation Participant Resource](https://www.twilio.com/docs/conversations/api/conversation-participant-resource) for an example. CustomerFriendlyName *string `json:"CustomerFriendlyName,omitempty"` // The pre-engagement data. PreEngagementData *string `json:"PreEngagementData,omitempty"` }
Optional parameters for the method 'CreateWebChannel'
func (*CreateWebChannelParams) SetAddressSid ¶
func (params *CreateWebChannelParams) SetAddressSid(AddressSid string) *CreateWebChannelParams
func (*CreateWebChannelParams) SetChatFriendlyName ¶
func (params *CreateWebChannelParams) SetChatFriendlyName(ChatFriendlyName string) *CreateWebChannelParams
func (*CreateWebChannelParams) SetCustomerFriendlyName ¶
func (params *CreateWebChannelParams) SetCustomerFriendlyName(CustomerFriendlyName string) *CreateWebChannelParams
func (*CreateWebChannelParams) SetPreEngagementData ¶
func (params *CreateWebChannelParams) SetPreEngagementData(PreEngagementData string) *CreateWebChannelParams
type FlexV2WebChannel ¶
type FlexV2WebChannel struct { // The unique string representing the [Conversation resource](https://www.twilio.com/docs/conversations/api/conversation-resource) created. ConversationSid *string `json:"conversation_sid,omitempty"` // The unique string representing the User created and should be authorized to participate in the Conversation. For more details, see [User Identity & Access Tokens](https://www.twilio.com/docs/conversations/identity). Identity *string `json:"identity,omitempty"` }
FlexV2WebChannel struct for FlexV2WebChannel
Click to show internal directories.
Click to hide internal directories.