Difference between revisions of "AddEventPlayback"

From Gvp-public
Jump to navigation Jump to search
(Created page with "{{Api_Method_Spec| Description= |Parameters= {{Api_Parameter| ParamName=token |ParamType=String |ParamRequired=required |ParamDescription=A valid token for identifying the ...")
 
Line 1: Line 1:
 
{{Api_Method_Spec|
 
{{Api_Method_Spec|
Description=
+
Description=The devices send events to the UNIAPI EventService to collect Playback events. They call to the addEventPlayback method to send this playback events.
  
 +
This events are sent only in the Player so it's related to VoD and Live contents and related to the HeartBeat event. In case of VoD contents, two kinds of request are made to register events in the platform: AddEventPlayback to register the analytics events and the events for the PlaybackHeartBeat control. In case of an OB has the PlaybackHeartBeat deactivated, and the device's play the Live content, the events for the Analytics won't be registered.
  
  
Line 12: Line 13:
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
ParamName=eventData
+
ParamName=playbackEventType
|ParamType=[[AnalyticsEventItem]]
+
|ParamType=
|ParamRequired=required
+
|ParamRequired=
|ParamDescription=The eventData parameter is an [[AnalyticsEventItem]] object type and represent a set of data to register the event in the Mongo data base. Each event has the Timestamp, Event and an object with many pair of key:value. It allow to add any pair key:value as you need because it will be add in the Mongo database dynamically inserting a new column by each new key added.
+
|ParamDescription=
: e.g.
+
}}
:: {
+
{{Api_Parameter|
:::  Token: "",
+
ParamName=contentId
:::  mediaInfo: "",
+
|ParamType=
:::  eventData: [
+
|ParamRequired=
::::  {
+
|ParamDescription=
:::::  "Timestamp" : "4315435114",
+
}}
:::::  "Event" : "EventName",
+
{{Api_Parameter|
:::::  "Data" :
+
ParamName=contentType
:::::::    {
+
|ParamType=
::::::::      "EventType":"STOP",
+
|ParamRequired=
::::::::      "ChannelNumber":1,
+
|ParamDescription=
::::::::      "ChannelName":"TVE 1",
 
::::::::      "ChannelCallLetter":"",
 
::::::::      "StreamQuality":"SD",
 
::::::::      "UniqueUserCode":null,
 
::::::::      "DeviceId":"3333333333332222222222227128",
 
::::::::      "OBInstanceCode":25,
 
::::::::      "UserType":null
 
:::::::    }
 
::::  },
 
::::  {
 
:::::  "Timestamp" : "34123543156",
 
:::::  "Event" : "AnotherEventName",
 
:::::  "Data" :
 
:::::::    {
 
::::::::      "EventType":"Rent",
 
::::::::      "ActionType":"Click",
 
::::::::      "ProductType":1,
 
::::::::      "DeviceId":"3333333333332222222222227128",
 
::::::::      "OBInstanceCode":29,
 
::::::::      "Advertising":null
 
::::::::      "MerchantId":123
 
:::::::    }
 
::::  }
 
:::  ]
 
:: }
 
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
ParamName=mediaInfo
+
ParamName=errorMessage
|ParamType=String
+
|ParamType=
|ParamRequired=optional
+
|ParamRequired=
|ParamDescription=This parameter can be found in the [[GetMediaURL]] and has all information about the Movie. Is passed, it will be used to assign the eventData with the movie.
+
|ParamDescription=
: e.g.
 
:: "MediaInfo": "eyJNb3ZpZUlkIjozNTkzNiwiTWVkaWFJZCI6 … XlsaXN0SWQiOjAsIk1lZGlhVHlwZSI6MSwiRHVyYXRpb24iOjU4MjB9"
 
 
}}
 
}}
 
  
  

Revision as of 15:46, 11 July 2014

Description

The devices send events to the UNIAPI EventService to collect Playback events. They call to the addEventPlayback method to send this playback events.

This events are sent only in the Player so it's related to VoD and Live contents and related to the HeartBeat event. In case of VoD contents, two kinds of request are made to register events in the platform: AddEventPlayback to register the analytics events and the events for the PlaybackHeartBeat control. In case of an OB has the PlaybackHeartBeat deactivated, and the device's play the Live content, the events for the Analytics won't be registered.

Parameters

  • token (String, required)
A valid token for identifying the API session context. The token can be anonymous or logged.
  • playbackEventType (, )
  • contentId (, )
  • contentType (, )
  • errorMessage (, )


Returns

Returns a JSON object containing the information if the event is registered on server.

Example:

{

"StatusCode": 0,
"Severity": 1,
"StatusMessage": "OK",
"Content": true

}


Exceptions

None


Caching

This method is not cached.


Known issues

None


Version history

API Version Number Change description Changes author
1.0 Initial method design Harley Cabral
2.4 Ricardo Calvo



See also