(abstract) new MediaEvent(nameopt, valueopt, propertiesopt, transactionIdopt)
MediaEvent abstract class with a predefined and known properties. Must be used via it's subclasses. This class is not accessible directly.
Properties:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
properties |
Object
|
||||||||||||||||||||||
Name | Type | Description |
---|---|---|
category |
String
|
e.g. "entertainment" |
identifier |
String
|
e.g. "12322" |
description |
String
|
e.g. "Watching latest entertainment news." |
type |
String
|
e.g. "video" |
author |
String
|
e.g. "UA Enterprises" |
feature |
Boolean
|
e.g. true |
published_date |
String
|
ISO date string: e.g. "2017-06-23", "2017-06-23T21:30:00" |
- See:
-
CustomEvent.templates.media
for usable subclasses.CustomEvent
for all properties and constructor details.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
String
|
<optional> |
||
value |
Number
|
<optional> |
||
properties |
Object
|
<optional> |
{} | |
transactionId |
String
|
<optional> |
Extends
Methods
(async) track() → {Promise}
Validates and tracks the custom event.
- Inherited From:
Returns:
- Type:
-
Promise
Resolves to {ok: true, operation_id}
on success.
Rejects any error found in CustomEvent#validate
.