openapi

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 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.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://frontline-api.twilio.com

Class Method HTTP request Description
UsersApi FetchUser Get /v1/Users/{Sid}
UsersApi UpdateUser Post /v1/Users/{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 added in v0.11.0

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

func NewApiService added in v0.11.0

func NewApiService(requestHandler *twilio.RequestHandler) *ApiService

func NewApiServiceWithClient added in v0.11.0

func NewApiServiceWithClient(client twilio.BaseClient) *ApiService

func (*ApiService) FetchUser added in v0.11.0

func (c *ApiService) FetchUser(Sid string) (*FrontlineV1User, error)

Fetch a frontline user

func (*ApiService) UpdateUser added in v0.11.0

func (c *ApiService) UpdateUser(Sid string, params *UpdateUserParams) (*FrontlineV1User, error)

Update an existing frontline user

type FrontlineV1User

type FrontlineV1User struct {
	// The unique string that we created to identify the User resource.
	Sid *string `json:"sid,omitempty"`
	// The application-defined string that uniquely identifies the resource's User. This value is often a username or an email address, and is case-sensitive.
	Identity *string `json:"identity,omitempty"`
	// The string that you assigned to describe the User.
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The avatar URL which will be shown in Frontline application.
	Avatar *string `json:"avatar,omitempty"`
	State  *string `json:"state,omitempty"`
	// Whether the User is available for new conversations. Defaults to `false` for new users.
	IsAvailable *bool `json:"is_available,omitempty"`
	// An absolute API resource URL for this user.
	Url *string `json:"url,omitempty"`
}

FrontlineV1User struct for FrontlineV1User

type UpdateUserParams

type UpdateUserParams struct {
	// The string that you assigned to describe the User.
	FriendlyName *string `json:"FriendlyName,omitempty"`
	// The avatar URL which will be shown in Frontline application.
	Avatar *string `json:"Avatar,omitempty"`
	//
	State *string `json:"State,omitempty"`
	// Whether the User is available for new conversations. Set to `false` to prevent User from receiving new inbound conversations if you are using [Pool Routing](https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing).
	IsAvailable *bool `json:"IsAvailable,omitempty"`
}

Optional parameters for the method 'UpdateUser'

func (*UpdateUserParams) SetAvatar

func (params *UpdateUserParams) SetAvatar(Avatar string) *UpdateUserParams

func (*UpdateUserParams) SetFriendlyName

func (params *UpdateUserParams) SetFriendlyName(FriendlyName string) *UpdateUserParams

func (*UpdateUserParams) SetIsAvailable added in v0.18.1

func (params *UpdateUserParams) SetIsAvailable(IsAvailable bool) *UpdateUserParams

func (*UpdateUserParams) SetState

func (params *UpdateUserParams) SetState(State string) *UpdateUserParams

Jump to

Keyboard shortcuts

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