Amazon Music Device API
Basic Types
The basic types described in this section are the building blocks that combine to form JSON object types. **NOTE: **An overview is given in section JSON Protocol.
LocalReference<T>
A local fragment URI that identifies a particular object of type T in the Document.
If the substring after the #
character is empty, then this local reference should be treated as if its URI were the value of the document’s result
member.
Otherwise, the location of the object depends on the type T:
- NavigationNodeSummary
- The object is one of the values in the document’s
navigationNodeSummaries
object. - NavigationNodeDescription
- The object is one of the values in the document’s
navigationNodeDescriptions
object. - ItemDescription
- The object is one of the values in the document’s
itemDescriptions
object. - TrackContainerChunkDescription
- The object is one of the values in the document’s
trackContainerChunkDescriptions
object. - TrackInstance
- The object is one of the values in the document’s
trackInstances
object. - TrackDefinition
- The object is one of the values in the document’s
trackDefinitions
object.
RemoteReference<T>
A URI that identifies a Representable<T> resource or a particular object of type T within the Document returned from a representable resource.
If the URI is a local fragment URI, then the remote reference should be treated as though it were a local reference to an object within the same document.
Otherwise, resolving a remote reference involves sending an HTTP GET request to the URI. A successful response will have a response entity whose type is Document<S> for some unknown type S. If the URI does not have a fragment, or the fragment is the single character #
, then S = T, and thus the response entity’s type is Document<T>.
Once a document has been obtained from the resource, the remote reference should be treated as though it were a local reference to an object in this document, whose URI consists only of the remote reference URI’s fragment — if any — or the empty fragment “#
”.
Timestamp
A string containing an RFC 3339 date and time representation, for example, “2015-08-31T18:45:00:000Z
” (RFC 3339 defines a restricted subset of ISO 8601 for use on the Internet).
Z
” or “-07:00
”. Timestamps should use the offset corresponding to the device’s local time.