version

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 9 Imported by: 4

Documentation

Overview

This package handles the versioning in the API for live/streaming transcription

This package handles the versioning in the API for live/streaming transcription

This package handles the versioning in the API for live/streaming transcription

This package handles the versioning in the API for live/streaming transcription

Index

Constants

View Source
const (
	// LiveAPIVersion current supported version
	LiveAPIVersion string = "v1"

	// LivePath is the current path for live transcription
	LivePath string = "listen"
)
View Source
const (
	// version
	ManageAPIVersion string = "v1"

	// balances
	BalancesURI     string = "projects/%s/balances"
	BalancesByIdURI string = "projects/%s/balances/%s"

	// invitations
	InvitationsURI      string = "projects/%s/invites"
	InvitationsByIdURI  string = "projects/%s/invites/%s"
	InvitationsLeaveURI string = "projects/%s/leave"

	// Keys
	KeysURI     string = "projects/%s/keys"
	KeysByIdURI string = "projects/%s/keys/%s"

	// Members
	MembersURI     string = "projects/%s/members"
	MembersByIdURI string = "projects/%s/members/%s"

	// projects
	ProjectsURI     string = "projects"
	ProjectsByIdURI string = "projects/%s"

	// scopes
	MembersScopeByIdURI string = "projects/%s/members/%s/scopes"

	// usage
	UsageRequestURI     string = "projects/%s/requests"
	UsageRequestByIdURI string = "projects/%s/requests/%s"
	UsageURI            string = "projects/%s/usage"
	UsageFieldsURI      string = "projects/%s/usage/fields"
)
View Source
const (
	// PrerecordedAPIVersion current supported version
	PrerecordedAPIVersion string = "v1"

	// PrerecordedPath is the current path for prerecorded transcription
	PrerecordedPath string = "listen"
)

Variables

View Source
var (
	// ErrInvalidPath invalid path
	ErrInvalidPath = errors.New("invalid path")
)

Functions

func GetLiveAPI

func GetLiveAPI(ctx context.Context, host, version, path string, options interfaces.LiveTranscriptionOptions, args ...interface{}) (string, error)

GetLiveAPI is a function which controls the versioning of the live transcription API and provides mechanism for:

- overriding the host endpoint - overriding the version used - overriding the endpoint path - additional arguments to the query string/parameters

The return value is the complete URL endpoint to be used for the live transcription

func GetManageAPI

func GetManageAPI(ctx context.Context, host, version, path string, vals interface{}, args ...interface{}) (string, error)

func GetPrerecordedAPI

func GetPrerecordedAPI(ctx context.Context, host, version, path string, options interfaces.PreRecordedTranscriptionOptions, args ...interface{}) (string, error)

GetLiveAPI is a function which controls the versioning of the live transcription API and provides mechanism for:

- overriding the host endpoint - overriding the version used - overriding the endpoint path - additional arguments to the query string/parameters

The return value is the complete URL endpoint to be used for the live transcription

Types

This section is empty.

Jump to

Keyboard shortcuts

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