amapi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Art

type Art struct {
	ContentDescription *string     `json:"contentDescription,omitempty"`
	Sources            []ArtSource `json:"sources"`
}

type ArtSource

type ArtSource struct {
	Url          string  `json:"url"`
	Size         *string `json:"size,omitempty"`
	WidthPixels  *int    `json:"widthPixels,omitempty"`
	HeightPixels *int    `json:"heightPixels,omitempty"`
}

type Content

type Content struct {
	Id       string         `json:"id"`
	Actions  ContentActions `json:"actions"`
	Metadata MediaMetadata  `json:"metadata"`
}

type ContentActions

type ContentActions struct {
	Playable  bool `json:"playable"`
	Browsable bool `json:"browsable"`
}

type EntityMetadata

type EntityMetadata struct {
	Name MetadataNameProperty `json:"name"`
}

type Filter

type Filter struct {
	ExplicitLanguageAllowed bool `json:"explicitLanguageAllowed"`
}

type GetPlayableContent

type GetPlayableContent struct {
	RequestContext    RequestContext            `json:"requestContext"`
	Filters           Filter                    `json:"filters"`
	SelectionCriteria ResolvedSelectionCriteria `json:"selectionCriteria"`
}

type GetPlayableContentResponse

type GetPlayableContentResponse struct {
	Content Content `json:"content"`
}
type Header struct {
	Namespace      string `json:"namespace"`
	Name           string `json:"name"`
	MessageId      string `json:"messageId"`
	PayloadVersion string `json:"payloadVersion"`
}

type Location

type Location struct {
	OriginatingLocale string `json:"originatingLocale"`
	CountryCode       string `json:"countryCode"`
}

type MediaMetadata

type MediaMetadata struct {
	Type       string                  `json:"type"`
	Name       MetadataNameProperty    `json:"name"`
	Authors    []EntityMetadata        `json:"authors"`
	Album      EntityMetadata          `json:"album"`
	Art        Art                     `json:"art,omitempty"`
	Background *StaticImagesBackground `json:"background,omitempty"`
}

type MetadataNameProperty

type MetadataNameProperty struct {
	Speech  SpeechInfo `json:"speech"`
	Display string     `json:"display"`
}

type Request

type Request struct {
	Header  Header      `json:"header"`
	Payload interface{} `json:"payload"`
}

func (*Request) BindPayload

func (m *Request) BindPayload(p interface{}) (err error)

func (*Request) LogPayload

func (m *Request) LogPayload()

type RequestContext

type RequestContext struct {
	User     User     `json:"user"`
	Location Location `json:"location"`
}

type ResolvedSelectionCriteria

type ResolvedSelectionCriteria struct {
	RawSelectionCriteriaId string                               `json:"rawSelectionCriteriaId"`
	Attributes             []ResolvedSelectionCriteriaAttribute `json:"attributes"`
}

type ResolvedSelectionCriteriaAttribute

type ResolvedSelectionCriteriaAttribute struct {
	Type     string `json:"type"`
	EntityId string `json:"entityId"`
	Value    string `json:"value"`
}

type Response

type Response struct {
	Header  Header      `json:"header"`
	Payload interface{} `json:"payload"`
}

func (*Response) LogPayload

func (m *Response) LogPayload()

type SpeechInfo

type SpeechInfo struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

type StaticImagesBackground

type StaticImagesBackground struct {
	// A string describing the type of background image.
	// Currently, the only possible value is "STATIC_IMAGES"
	Type string `json:"type"`
}

type User

type User struct {
	Id          string `json:"id"`
	AccessToken string `json:"accessToken"`
}

Jump to

Keyboard shortcuts

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