Categories:
TV VOD EPG information plugin
Complex Logic Framework plugin for the TV VOD EPG information use case
Introduction
The TV VOD EPG information plugin resolves the request from a user getting information about the TV content broadcasted in this specific moment
It includes some key steps described in the following sections.
Validate input request
This step validates that the input request fulfills all the requirements from the input schema.
If the input data has an error, the resource returned is:
tv:video.model-validation.request.error.
Get VOD EPG information about a playing content
The VOD EPG information about a playing content is based in the catalog type and content id.
To retrieve content information stage follows the steps set below:
Video query API
We will make a query to Video Contents normalized Kernel API to retrieve content.
To make this API call, several parameters are needed, which are described below:
user_id: Inputdata[aura_user][user_id]access_token: Inputdata[aura_user][access_token]catalog_type: Inputdata[app_context][playing][catalog_type]where “vod” is “VOD”, “l7d” and “record” is “L7D”, and “live” is “LIVE”.administrative_number: Inputdata[app_context][user][account_number]content_id: Inputdata[app_context][playing][content_id]scopes: Inputdata[aura_user][scopes]purposes: Inputdata[aura_user][purposes]device_type: Inputdata[app_context][device][type]
VOD EPG information response
When a user requests for getting playing EPG information about a specific content, the following possible scenarios can occur for the response:
a. Receive a content with the EPG information and the request contain devices entities (ent.device_tv, ent.device_mobile, ent.device_phone). The returned resource is tv:tv.moreInfoTvDetail
b. Receive a content with the EPG information and the request does not contain any devices entities (ent.device_tv, ent.device_mobile, ent.device_phone). The returned resource is tv:carousel.info.contentDetail
c. Not received or not found in API any content with the EPG information and the request does not contain any devices entities (ent.device_tv, ent.device_mobile, ent.device_phone). The returned resource is tv:tv.moreInfoTvNotAllowed
d. Not received or not found in API any content with the EPG information and the request contain devices entities (ent.device_tv, ent.device_mobile, ent.device_phone). The returned resource is tv:tv.more_info.notAllowed
e. Receive an API error. The returned resource is tv:video.api.answer.error
Response
The response follows this response schema.
Where:
-
intent: input intent. -
entities: input entities. -
result_intent: This field is alwaysMEDIA.SHEET_TVexcept when the resource istv:carousel.info.contentDetailortv:tv.more_info.notAllowed. In this case this field isMEDIA.SHEET_SECOND_SCREEN. -
resources: List of response resources that includes three main parameters:type: Type of the response resource.name: Name of the response resource. Example:tv:tv.moreInfoTvDetailparams: This field returns any required parameter in the resource.
-
payload: Information provided by the Kernel API, when we make the VOD EPG information request. For this case, If we receive a response, it is a value and then this field includes the following parameters:type:detailsdata: It returns the information provided by the Kernel API.
-
status: Final status request. This field includes the following parameters:code: Status code.message: Status message, which describes the status code.params: Parameter that sends details of status. This field does not appear if it is empty.
-
actions: Actions to follow with the result of request. -
conditions: Condition for the actions to be applied.