api

package
v0.9.64 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Package api defines all APIs supported by the VCA service of BCE.

Index

Constants

View Source
const (
	URI_PREFIX = bce.URI_PREFIX + "v1"
	MEDIA_URI  = "/media"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzeAttribute

type AnalyzeAttribute struct {
	Attribute     string       `json:"attribute"`
	Confidence    float32      `json:"confidence"`
	Source        string       `json:"source"`
	AttributeTime []TimePeriod `json:"time"`
}

type AnalyzeError

type AnalyzeError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type AnalyzeResult

type AnalyzeResult struct {
	Type       string             `json:"type"`
	Attributes []AnalyzeAttribute `json:"result"`
}

type GetMediaResult

type GetMediaResult struct {
	Source       string          `json:"source"`
	MediaId      string          `json:"mediaId"`
	Title        string          `json:"title"`
	Description  string          `json:"description"`
	Preset       string          `json:"preset"`
	Status       string          `json:"status"`
	Percent      int             `json:"percent"`
	Notification string          `json:"notification"`
	CreateTime   string          `json:"createTime"`
	StartTime    string          `json:"startTime"`
	PublishTime  string          `json:"publishTime"`
	Results      []AnalyzeResult `json:"results"`
	Error        AnalyzeError    `json:"error"`
}

func GetMedia

func GetMedia(cli bce.Client, source string) (*GetMediaResult, error)

func PutMedia

func PutMedia(cli bce.Client, args *PutMediaArgs) (*GetMediaResult, error)

type PutMediaArgs

type PutMediaArgs struct {
	Source       string `json:"source"`
	Auth         string `json:"auth"`
	Title        string `json:"title"`
	Description  string `json:"description"`
	Preset       string `json:"preset"`
	Notification string `json:"notification"`
}

type TimePeriod

type TimePeriod struct {
	Start int `json:"start"`
	End   int `json:"end"`
}

Jump to

Keyboard shortcuts

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