response

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlexaError

func AlexaError(type_ types.ErrorType, headerMessageId string, message string, subtypes ...types.ErrorType) *amsapi.Response

AlexaError returns a general error response body. https://developer.amazon.com/en-US/docs/alexa/music-skills/api-error-response.html#general-errors

func AudioError

func AudioError(type_ types.ErrorType, headerMessageId string, message string, retryPeriod types.AudioSkipRetryPeriod) *amsapi.Response

AudioError returns audio specific response body. https://developer.amazon.com/en-US/docs/alexa/music-skills/api-error-response.html#audio-specific-errors

func MediaError

func MediaError(type_ types.ErrorType, headerMessageId string, message string, subtypes ...types.ErrorType) *amsapi.Response

MediaError returns a media specific response body. https://developer.amazon.com/en-US/docs/alexa/music-skills/api-error-response.html#media-specific-errors

Types

type ErrorPayload

type ErrorPayload struct {
	Type        types.ErrorType            `json:"type"`
	SubTypes    []types.ErrorType          `json:"subtypes,omitempty"`
	Message     string                     `json:"message"`
	RetryPeriod types.AudioSkipRetryPeriod `json:"retryPeriod,omitempty"`
}

ErrorPayload is the response payload used by AlexaError, MediaError, and AudioError. SubTypes and RetryPeriod are only valid for certain error types.

Jump to

Keyboard shortcuts

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