openapi

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 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.27.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://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 avatar URL which will be shown in Frontline application
	Avatar *string `json:"avatar,omitempty"`
	// The string that you assigned to describe the User
	FriendlyName *string `json:"friendly_name,omitempty"`
	// The string that identifies the resource's User
	Identity *string `json:"identity,omitempty"`
	// Whether the User is available for new conversations
	IsAvailable *bool `json:"is_available,omitempty"`
	// The unique string that identifies the resource
	Sid *string `json:"sid,omitempty"`
	// Current state of this user
	State *string `json:"state,omitempty"`
	// An absolute URL for this user.
	Url *string `json:"url,omitempty"`
}

FrontlineV1User struct for FrontlineV1User

type UpdateUserParams

type UpdateUserParams struct {
	// The avatar URL which will be shown in Frontline application.
	Avatar *string `json:"Avatar,omitempty"`
	// The string that you assigned to describe the User.
	FriendlyName *string `json:"FriendlyName,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"`
	// Current state of this user. Can be either `active` or `deactivated`.
	State *string `json:"State,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