MediaText
Extends
Media
class MediaText extends Media
Static
create
static create(json = null): MediaText
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Returns:
Type: MediaText
getName
static getName(): string
Returns:
Type: constant ("MediaText": string)
Constructor
constructor
constructor(json = null): MediaText
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Properties
content
Type | Default | Description |
---|---|---|
string | null | null |
format
Type | Default | Description |
---|---|---|
string | null | null |
identifier
Type | Default | Description |
---|---|---|
string | null | null |
Overwritten Properties
type
Type | Default | Description |
---|---|---|
enum(MEDIA_TYPES) | MEDIA_TYPES.TEXT |
Read-Only
Inherited 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') |
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 | |
content | string | null | |
format | string | null | |
identifier | string | null |
fromJSON
fromJSON(json: object): MediaText
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 | 'text' | |
json.updated_at | string | null | No | null | Datetime in ISO 8601 format |
json.version | int | null | No | null | |
json.content | string | null | No | null | |
json.format | string | null | No | null | |
json.identifier | string | null | No | null |
Returns:
Returns this
clone
clone(): MediaText
Returns:
A new deep copy
Type: MediaText