openapi

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 6 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.16.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://insights.twilio.com

Class Method HTTP request Description
DefaultApi FetchCall Get /v1/Voice/{Sid}
DefaultApi FetchSummary Get /v1/Voice/{CallSid}/Summary
DefaultApi FetchVideoParticipantSummary Get /v1/Video/Rooms/{RoomSid}/Participants/{ParticipantSid}
DefaultApi FetchVideoRoomSummary Get /v1/Video/Rooms/{RoomSid}
DefaultApi ListEvent Get /v1/Voice/{CallSid}/Events
DefaultApi ListMetric Get /v1/Voice/{CallSid}/Metrics
DefaultApi ListVideoParticipantSummary Get /v1/Video/Rooms/{RoomSid}/Participants
DefaultApi ListVideoRoomSummary Get /v1/Video/Rooms

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)

Author

support@twilio.com

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultApiService

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

func NewDefaultApiService

func NewDefaultApiService(requestHandler *twilio.RequestHandler) *DefaultApiService

func NewDefaultApiServiceWithClient added in v0.9.0

func NewDefaultApiServiceWithClient(client twilio.BaseClient) *DefaultApiService

func (*DefaultApiService) FetchCall

func (c *DefaultApiService) FetchCall(Sid string) (*InsightsV1Call, error)

func (*DefaultApiService) FetchSummary

func (c *DefaultApiService) FetchSummary(CallSid string, params *FetchSummaryParams) (*InsightsV1CallSummary, error)

func (*DefaultApiService) FetchVideoParticipantSummary

func (c *DefaultApiService) FetchVideoParticipantSummary(RoomSid string, ParticipantSid string) (*InsightsV1VideoRoomSummaryVideoParticipantSummary, error)

Get Video Log Analyzer data for a Room Participant.

func (*DefaultApiService) FetchVideoRoomSummary

func (c *DefaultApiService) FetchVideoRoomSummary(RoomSid string) (*InsightsV1VideoRoomSummary, error)

Get Video Log Analyzer data for a Room.

func (*DefaultApiService) ListEvent

func (c *DefaultApiService) ListEvent(CallSid string, params *ListEventParams) (*ListEventResponse, error)

func (*DefaultApiService) ListMetric

func (c *DefaultApiService) ListMetric(CallSid string, params *ListMetricParams) (*ListMetricResponse, error)

func (*DefaultApiService) ListVideoParticipantSummary

func (c *DefaultApiService) ListVideoParticipantSummary(RoomSid string, params *ListVideoParticipantSummaryParams) (*ListVideoParticipantSummaryResponse, error)

Get a list of room participants.

func (*DefaultApiService) ListVideoRoomSummary

Get a list of Programmable Video Rooms.

type FetchSummaryParams

type FetchSummaryParams struct {
	//
	ProcessingState *string `json:"ProcessingState,omitempty"`
}

Optional parameters for the method 'FetchSummary'

func (*FetchSummaryParams) SetProcessingState

func (params *FetchSummaryParams) SetProcessingState(ProcessingState string) *FetchSummaryParams

type InsightsV1Call

type InsightsV1Call struct {
	Links *map[string]interface{} `json:"links,omitempty"`
	Sid   *string                 `json:"sid,omitempty"`
	Url   *string                 `json:"url,omitempty"`
}

InsightsV1Call struct for InsightsV1Call

type InsightsV1CallEvent

type InsightsV1CallEvent struct {
	AccountSid  *string                 `json:"account_sid,omitempty"`
	CallSid     *string                 `json:"call_sid,omitempty"`
	CarrierEdge *map[string]interface{} `json:"carrier_edge,omitempty"`
	ClientEdge  *map[string]interface{} `json:"client_edge,omitempty"`
	Edge        *string                 `json:"edge,omitempty"`
	Group       *string                 `json:"group,omitempty"`
	Level       *string                 `json:"level,omitempty"`
	Name        *string                 `json:"name,omitempty"`
	SdkEdge     *map[string]interface{} `json:"sdk_edge,omitempty"`
	SipEdge     *map[string]interface{} `json:"sip_edge,omitempty"`
	Timestamp   *string                 `json:"timestamp,omitempty"`
}

InsightsV1CallEvent struct for InsightsV1CallEvent

type InsightsV1CallMetric

type InsightsV1CallMetric struct {
	AccountSid  *string                 `json:"account_sid,omitempty"`
	CallSid     *string                 `json:"call_sid,omitempty"`
	CarrierEdge *map[string]interface{} `json:"carrier_edge,omitempty"`
	ClientEdge  *map[string]interface{} `json:"client_edge,omitempty"`
	Direction   *string                 `json:"direction,omitempty"`
	Edge        *string                 `json:"edge,omitempty"`
	SdkEdge     *map[string]interface{} `json:"sdk_edge,omitempty"`
	SipEdge     *map[string]interface{} `json:"sip_edge,omitempty"`
	Timestamp   *string                 `json:"timestamp,omitempty"`
}

InsightsV1CallMetric struct for InsightsV1CallMetric

type InsightsV1CallSummary

type InsightsV1CallSummary struct {
	AccountSid      *string                 `json:"account_sid,omitempty"`
	Attributes      *map[string]interface{} `json:"attributes,omitempty"`
	CallSid         *string                 `json:"call_sid,omitempty"`
	CallState       *string                 `json:"call_state,omitempty"`
	CallType        *string                 `json:"call_type,omitempty"`
	CarrierEdge     *map[string]interface{} `json:"carrier_edge,omitempty"`
	ClientEdge      *map[string]interface{} `json:"client_edge,omitempty"`
	ConnectDuration *int32                  `json:"connect_duration,omitempty"`
	CreatedTime     *time.Time              `json:"created_time,omitempty"`
	Duration        *int32                  `json:"duration,omitempty"`
	EndTime         *time.Time              `json:"end_time,omitempty"`
	From            *map[string]interface{} `json:"from,omitempty"`
	ProcessingState *string                 `json:"processing_state,omitempty"`
	Properties      *map[string]interface{} `json:"properties,omitempty"`
	SdkEdge         *map[string]interface{} `json:"sdk_edge,omitempty"`
	SipEdge         *map[string]interface{} `json:"sip_edge,omitempty"`
	StartTime       *time.Time              `json:"start_time,omitempty"`
	Tags            *[]string               `json:"tags,omitempty"`
	To              *map[string]interface{} `json:"to,omitempty"`
	Trust           *map[string]interface{} `json:"trust,omitempty"`
	Url             *string                 `json:"url,omitempty"`
}

InsightsV1CallSummary struct for InsightsV1CallSummary

type InsightsV1VideoRoomSummary

type InsightsV1VideoRoomSummary struct {
	// Account SID associated with this room.
	AccountSid *string `json:"account_sid,omitempty"`
	// Codecs used by participants in the room.
	Codecs *[]string `json:"codecs,omitempty"`
	// Actual number of concurrent participants.
	ConcurrentParticipants *int32 `json:"concurrent_participants,omitempty"`
	// Creation time of the room.
	CreateTime *time.Time `json:"create_time,omitempty"`
	// How the room was created.
	CreatedMethod *string `json:"created_method,omitempty"`
	// Total room duration from create time to end time.
	DurationSec *int32 `json:"duration_sec,omitempty"`
	// Edge location of Twilio media servers for the room.
	EdgeLocation *string `json:"edge_location,omitempty"`
	// Reason the room ended.
	EndReason *string `json:"end_reason,omitempty"`
	// End time for the room.
	EndTime *time.Time `json:"end_time,omitempty"`
	// Room subresources.
	Links *map[string]interface{} `json:"links,omitempty"`
	// Maximum number of participants allowed in the room at the same time allowed by the application settings.
	MaxConcurrentParticipants *int32 `json:"max_concurrent_participants,omitempty"`
	// Max number of total participants allowed by the application settings.
	MaxParticipants *int32 `json:"max_participants,omitempty"`
	// Region of Twilio media servers for the room.
	MediaRegion *string `json:"media_region,omitempty"`
	// Video Log Analyzer resource state. Will be either `in-progress` or `complete`.
	ProcessingState *string `json:"processing_state,omitempty"`
	// Boolean indicating if recording is enabled for the room.
	RecordingEnabled *bool `json:"recording_enabled,omitempty"`
	// room friendly name.
	RoomName *string `json:"room_name,omitempty"`
	// Unique identifier for the room.
	RoomSid *string `json:"room_sid,omitempty"`
	// Status of the room.
	RoomStatus *string `json:"room_status,omitempty"`
	// Type of room.
	RoomType *string `json:"room_type,omitempty"`
	// Webhook provided for status callbacks.
	StatusCallback *string `json:"status_callback,omitempty"`
	// HTTP method provided for status callback URL.
	StatusCallbackMethod *string `json:"status_callback_method,omitempty"`
	// Combined amount of participant time in the room.
	TotalParticipantDurationSec *int32 `json:"total_participant_duration_sec,omitempty"`
	// Combined amount of recorded seconds for participants in the room.
	TotalRecordingDurationSec *int32 `json:"total_recording_duration_sec,omitempty"`
	// Unique number of participant identities.
	UniqueParticipantIdentities *int32 `json:"unique_participant_identities,omitempty"`
	// Number of participants. May include duplicate identities for participants who left and rejoined.
	UniqueParticipants *int32 `json:"unique_participants,omitempty"`
	// URL for the room resource.
	Url *string `json:"url,omitempty"`
}

InsightsV1VideoRoomSummary struct for InsightsV1VideoRoomSummary

type InsightsV1VideoRoomSummaryVideoParticipantSummary

type InsightsV1VideoRoomSummaryVideoParticipantSummary struct {
	// Account SID associated with the room.
	AccountSid *string `json:"account_sid,omitempty"`
	// Codecs detected from the participant.
	Codecs *[]string `json:"codecs,omitempty"`
	// Amount of time in seconds the participant was in the room.
	DurationSec *int32 `json:"duration_sec,omitempty"`
	// Name of the edge location the participant connected to.
	EdgeLocation *string `json:"edge_location,omitempty"`
	// Reason the participant left the room.
	EndReason *string `json:"end_reason,omitempty"`
	// Errors encountered by the participant.
	ErrorCode *int32 `json:"error_code,omitempty"`
	// Twilio error code dictionary link.
	ErrorCodeUrl *string `json:"error_code_url,omitempty"`
	// When the participant joined the room.
	JoinTime *time.Time `json:"join_time,omitempty"`
	// When the participant left the room
	LeaveTime *time.Time `json:"leave_time,omitempty"`
	// Twilio media region the participant connected to.
	MediaRegion *string `json:"media_region,omitempty"`
	// The application-defined string that uniquely identifies the participant within a Room.
	ParticipantIdentity *string `json:"participant_identity,omitempty"`
	// Unique identifier for the participant.
	ParticipantSid *string `json:"participant_sid,omitempty"`
	// Object containing information about the participant's data from the room.
	Properties *map[string]interface{} `json:"properties,omitempty"`
	// Object containing information about the SDK name and version.
	PublisherInfo *map[string]interface{} `json:"publisher_info,omitempty"`
	// Unique identifier for the room.
	RoomSid *string `json:"room_sid,omitempty"`
	// Status of the room.
	Status *string `json:"status,omitempty"`
	// URL of the participant resource.
	Url *string `json:"url,omitempty"`
}

InsightsV1VideoRoomSummaryVideoParticipantSummary struct for InsightsV1VideoRoomSummaryVideoParticipantSummary

type ListEventParams

type ListEventParams struct {
	//
	Edge *string `json:"Edge,omitempty"`
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int32 `json:"PageSize,omitempty"`
}

Optional parameters for the method 'ListEvent'

func (*ListEventParams) SetEdge

func (params *ListEventParams) SetEdge(Edge string) *ListEventParams

func (*ListEventParams) SetPageSize

func (params *ListEventParams) SetPageSize(PageSize int32) *ListEventParams

type ListEventResponse

type ListEventResponse struct {
	Events []InsightsV1CallEvent            `json:"events,omitempty"`
	Meta   ListVideoRoomSummaryResponseMeta `json:"meta,omitempty"`
}

ListEventResponse struct for ListEventResponse

type ListMetricParams

type ListMetricParams struct {
	//
	Edge *string `json:"Edge,omitempty"`
	//
	Direction *string `json:"Direction,omitempty"`
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int32 `json:"PageSize,omitempty"`
}

Optional parameters for the method 'ListMetric'

func (*ListMetricParams) SetDirection

func (params *ListMetricParams) SetDirection(Direction string) *ListMetricParams

func (*ListMetricParams) SetEdge

func (params *ListMetricParams) SetEdge(Edge string) *ListMetricParams

func (*ListMetricParams) SetPageSize

func (params *ListMetricParams) SetPageSize(PageSize int32) *ListMetricParams

type ListMetricResponse

type ListMetricResponse struct {
	Meta    ListVideoRoomSummaryResponseMeta `json:"meta,omitempty"`
	Metrics []InsightsV1CallMetric           `json:"metrics,omitempty"`
}

ListMetricResponse struct for ListMetricResponse

type ListVideoParticipantSummaryParams

type ListVideoParticipantSummaryParams struct {
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int32 `json:"PageSize,omitempty"`
}

Optional parameters for the method 'ListVideoParticipantSummary'

func (*ListVideoParticipantSummaryParams) SetPageSize

type ListVideoParticipantSummaryResponse

type ListVideoParticipantSummaryResponse struct {
	Meta         ListVideoRoomSummaryResponseMeta                    `json:"meta,omitempty"`
	Participants []InsightsV1VideoRoomSummaryVideoParticipantSummary `json:"participants,omitempty"`
}

ListVideoParticipantSummaryResponse struct for ListVideoParticipantSummaryResponse

type ListVideoRoomSummaryParams

type ListVideoRoomSummaryParams struct {
	// Type of room. Can be `go`, `peer_to_peer`, `group`, or `group_small`.
	RoomType *[]string `json:"RoomType,omitempty"`
	// Codecs used by participants in the room. Can be `VP8`, `H264`, or `VP9`.
	Codec *[]string `json:"Codec,omitempty"`
	// Room friendly name.
	RoomName *string `json:"RoomName,omitempty"`
	// Only read rooms that started on or after this ISO 8601 timestamp.
	CreatedAfter *time.Time `json:"CreatedAfter,omitempty"`
	// Only read rooms that started before this ISO 8601 timestamp.
	CreatedBefore *time.Time `json:"CreatedBefore,omitempty"`
	// How many resources to return in each list page. The default is 50, and the maximum is 1000.
	PageSize *int32 `json:"PageSize,omitempty"`
}

Optional parameters for the method 'ListVideoRoomSummary'

func (*ListVideoRoomSummaryParams) SetCodec

func (*ListVideoRoomSummaryParams) SetCreatedAfter

func (params *ListVideoRoomSummaryParams) SetCreatedAfter(CreatedAfter time.Time) *ListVideoRoomSummaryParams

func (*ListVideoRoomSummaryParams) SetCreatedBefore

func (params *ListVideoRoomSummaryParams) SetCreatedBefore(CreatedBefore time.Time) *ListVideoRoomSummaryParams

func (*ListVideoRoomSummaryParams) SetPageSize

func (params *ListVideoRoomSummaryParams) SetPageSize(PageSize int32) *ListVideoRoomSummaryParams

func (*ListVideoRoomSummaryParams) SetRoomName

func (params *ListVideoRoomSummaryParams) SetRoomName(RoomName string) *ListVideoRoomSummaryParams

func (*ListVideoRoomSummaryParams) SetRoomType

func (params *ListVideoRoomSummaryParams) SetRoomType(RoomType []string) *ListVideoRoomSummaryParams

type ListVideoRoomSummaryResponse

type ListVideoRoomSummaryResponse struct {
	Meta  ListVideoRoomSummaryResponseMeta `json:"meta,omitempty"`
	Rooms []InsightsV1VideoRoomSummary     `json:"rooms,omitempty"`
}

ListVideoRoomSummaryResponse struct for ListVideoRoomSummaryResponse

type ListVideoRoomSummaryResponseMeta

type ListVideoRoomSummaryResponseMeta struct {
	FirstPageUrl    string `json:"first_page_url,omitempty"`
	Key             string `json:"key,omitempty"`
	NextPageUrl     string `json:"next_page_url,omitempty"`
	Page            int32  `json:"page,omitempty"`
	PageSize        int32  `json:"page_size,omitempty"`
	PreviousPageUrl string `json:"previous_page_url,omitempty"`
	Url             string `json:"url,omitempty"`
}

ListVideoRoomSummaryResponseMeta struct for ListVideoRoomSummaryResponseMeta

Jump to

Keyboard shortcuts

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