Media
Extends
AbstractEntity
class Media extends AbstractEntity
Specialized Entities
Static
create
static create(json = null): Media
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Returns:
Type: Media
getName
static getName(): string
Returns:
Type: constant ("Media": string)
Constructor
constructor
constructor(json = null): Media
Media is abstract and cannot be instantiated
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Properties
client_id
| Type | Default | Description |
|---|---|---|
| string | null | null |
created_at
| Type | Default | Description |
|---|---|---|
| Date | null | null |
Read-Only
description
| Type | Default | Description |
|---|---|---|
| string | null | null |
end_at
| Type | Default | Description |
|---|---|---|
| Date | null | null |
id
| Type | Default | Description |
|---|---|---|
| null | int | symbol | null | The entity identifier |
metadata
| Type | Default | Description |
|---|---|---|
| Map | new Map() |
name
| Type | Default | Description |
|---|---|---|
| string | null |
playlists
| Type | Default | Description |
|---|---|---|
| OrderedCollection<Playlist> | new OrderedCollection('Playlist') |
pois
| Type | Default | Description |
|---|---|---|
| Collection<Poi> | new Collection('Poi') |
preview
| Type | Default | Description |
|---|---|---|
| Reference<File> | new Reference('File', null) |
signature
| Type | Default | Description |
|---|---|---|
| string | null | null |
site
| Type | Default | Description |
|---|---|---|
| Reference<Site> | new Reference('Site', null) |
start_at
| Type | Default | Description |
|---|---|---|
| Date | null | null |
tags
| Type | Default | Description |
|---|---|---|
| Collection<Tag> | new Collection('Tag') |
type
| Type | Default | Description |
|---|---|---|
| enum(MEDIA_TYPES) | null |
Read-Only
updated_at
| Type | Default | Description |
|---|---|---|
| Date | null | null |
Read-Only
version
| Type | Default | Description |
|---|---|---|
| int | null |
Read-Only
Methods
toJSON
toJSON(): object
Returns:
Type: object (see properties bellow)
| Name | Type | Description |
|---|---|---|
| client_id | string | null | |
| created_at | string | null | Datetime in ISO 8601 format |
| description | null | string | |
| end_at | string | null | Datetime in ISO 8601 format |
| id | null | int | symbol | |
| metadata | object | |
| name | string | null | |
| playlists | Array<{id: int | symbol, position: int}> | |
| pois | Array<int | symbol> | |
| preview | null | int | symbol | |
| signature | string | null | |
| site | null | int | symbol | |
| start_at | string | null | Datetime in ISO 8601 format |
| type | string | null | |
| updated_at | string | null | Datetime in ISO 8601 format |
| version | int | null |
fromJSON
fromJSON(json: object): Media
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| json | object | Yes | - | |
| json.client_id | string | null | No | null | |
| json.created_at | string | null | No | null | Datetime in ISO 8601 format |
| json.description | null | string | No | null | |
| json.end_at | string | null | No | null | Datetime in ISO 8601 format |
| json.id | null | int | symbol | No | null | |
| json.metadata | object | No | {} | |
| json.name | string | null | No | null | |
| json.playlists | Array<{id: int | symbol, position: int}> | No | [] | |
| json.pois | Array<int | symbol> | No | [] | |
| json.preview | null | int | symbol | No | null | |
| json.signature | string | null | No | null | |
| json.site | null | int | symbol | No | null | |
| json.start_at | string | null | No | null | Datetime in ISO 8601 format |
| json.type | string | null | No | null | |
| json.updated_at | string | null | No | null | Datetime in ISO 8601 format |
| json.version | int | null | No | null |
Returns:
Returns this
clone
clone(): Media
Returns:
A new deep copy
Type: Media
