Changes

Jump to navigation Jump to search
7,785 bytes added ,  08:50, 13 July 2015
Created page with "The '''SimpleItem''' object is the one returned by all recommendation requests to the New-style API. It is essentially the same as the already existing [https://wikis.tid.es/g..."
The '''SimpleItem''' object is the one returned by all recommendation requests to the New-style API. It is essentially the same as the already existing [https://wikis.tid.es/gvp-public/index.php/SimpleMovie '''SimpleMovie'''] object in UNIAPI, with a few small differences:
* Two fields, '''Views''' (Number of times the content has been watched) and '''AgeRating''' (age classification) have been removed from the object, due to both computational and design/commercial reasons.
* The '''RequiresPin''' and '''AvailableForThisDevice''' fields have also been removed (availability information is fetched when entering the item details page).
* The field '''Source''' can be present to indicate the source of recommendations.
* The field '''ItemData''' and '''EditorialUrl''' includes some extra information that will be interpreted by devices.


The '''SimpleItem''' object contains the following fields:

{| style="width:800px;" cellpadding="5" cellspacing="0" border="1"
|- style="background:#88ccff;font-size:110%"
! style="width:50px;" | Field !! style="width:60px;" | Type !! style="width:40px;" | Required !! style="width:50px;" | Description
|-
| '''ID''' || align="center" | Integer || align="center" | Yes || Numeric identifier of the item. It is a GVP content ID.
|-
| '''Title''' || align="center" | String || align="center" | Yes || Content title.
|-
| '''Type''' || align="center" | [https://wikis.tid.es/gvp-public/index.php/MovieType MovieType] enum || align="center" | Yes || Type of the content.
|-
| '''Duration''' || align="center" | Integer || align="center" | Yes || Content duration in seconds.
|-
| '''ResizableImages''' || align="center" | Array of [https://wikis.tid.es/gvp-public/index.php/Image Image] objets || align="center" | Yes || List of original images.
|-
| '''Stars''' || align="center" | Float || align="center" | Yes || Overall rating computed by the Recom Engine. It is returned when it can be obtained. If, for any reason, it cannot be retrieved, this field is not included in the SimpleItem object.
|-
| '''Year''' || align="center" | Integer || align="center" | Yes || Release year of the content in the GVP catalog. It is returned when it can be obtained. If, for any reason, it cannot be obtained, this field is not included in the SimpleItem object.
|-
| '''Hd''' || align="center" | Boolean || align="center" | Yes || Signals if a High Definition (HD) version of the content is available. It is returned when it can be obtained. If, for any reason, it cannot be obtained, this field is not included in the SimpleItem object.
|-
| '''ShortDescription''' || align="center" | String || align="center" | Yes || Content blurb, (only for editorial content). Likely only for editorial content, since it is the only type of content whose placement in the client allows space for rendering it. It is returned when it can be obtained. If, for any reason, it cannot be obtained, this field is not included in the SimpleItem object.
|-
| '''Source''' || align="center" | [[OpenGVP:_Source_Type|Source]] enum || align="center" | Yes || Source the recommended item comes from. It will be present only in result lists of SimpleItem objects that mix different sources.
|-
| '''DateStart''' || align="center" | Integer || align="center" | Yes || License Start in Unix Timestamp. It can be used to determine if the content is new in the catalog.
|-
| '''DateEnd''' || align="center" | Integer || align="center" | Yes || License End in Unix Timestamp. It can be used to determine if the content is close to be unavailable.
|-
| '''Distributor''' || align="center" | String || align="center" | Yes || Title of the content distributor. If the CommercializationTypeId is equals to 1 (Catchup) this field is the Call Letter of the Linear TV Channel where the content was originally broadcasted.
|-
| '''CommercializationTypeId''' || align="center" | [https://wikis.tid.es/gvp-public/index.php/CommercializationType CommercializationType] enum || align="center" | Yes || ID of commercialization type.
|-
| '''ItemData''' || align="center" | JSON || align="center" | Yes || Data loaded by OB for editorial recommendations. This field is not processed by OpenGVP and it is interpreted directly by devices. It usually is an image data of type “banner”.
|-
| '''EditorialUrl''' || align="center" | String || align="center" | YEs || URL loaded by OB for editorial recommendations. This field is not processed by OpenGVP and it is interpreted directly by devices. It usually is the link to jump when a click over the editorial recommendation banner is done on the UI.
|}


All required data, except '''Source''', '''Stars''', '''ItemData''' and '''EditorialUrl''' are retrieved from '''GVP Backend API''' through the next operations:
/Data/Movie/<product_id_list>/filters/MetadataLanguage/<language_id>
/Data/Image/<image_id_list>


For sources equals to '''Popular''', '''Highly Rated''' and '''Personal''', SimpleItem objects can represent exclusively '''movies''' (Type = 1) and '''TV series''' (Type = 2).


==== SimpleItem Object for Editorial Recommendations ====

'''SimpleItem''' objects for '''Editorial Recommendations''' can represent:
* Promotions related to a content:
** Movies (Type = 1)
** TV series (Type = 2)
** Seasons (Type = 3)
** Episodes (Type = 4)

* Promotion not directly related to a content:
** Subscriptions
** Playlist
** Detached banners (image not associated to any GVP Product)
** Etc.


'''SimpleItem''' objects for editorial recommendations related to contents are composed by the same fields that a regular recommendation and, additionally, it contains the '''ItemData''' and '''EditorialUrl''' fields. These extra fields are used to hold all data introduced by a human operator to configure the editorial recommendation through the MiB web tool.


'''SimpleItem''' objects for editorial recommendations not directly related to contents are composed by:
* Only '''ID''', '''Type''', '''Source''' (if is not implicit in the method) and '''ItemData''' (optional) fields are returned.
* '''ID''' and '''Type''' are set to 0.
* '''ItemData''' field contains all data introduced by a human operator to configure the editorial recommendation through the MiB web tool. The client application must interpret this data to display properly the editorial recommendation on the screen.
: '''ItemData''' JSON object cannot be empty and inside if the '''Url''' field cannot be empty. '''SimpleItem''' objects with empty '''ItemData''' or empty '''Url''' are discarded because they cannot be displayed by client applications.
* '''EditorialUrl''' can be set to an empty or non-empty string.

Next is an example of a '''SimpleItem''' that represent a correct editorial recommendations not directly related to a content.

{
"Type": 0,
"ID": 0,
"ItemData": {
"Url": "http://gvp.dev4.storage.s3.amazonaws.com:80/IMAGES/00/00/01/19140_60C6F49707EC84C8.jpg",
"Width": 1024,
"Type": 3,
"ID": 19140,
"Height": 768
},
"EditorialUrl": “http://server:port/path/page.htmel”
}


Next are examples of a not valid '''SimpleItem''' to represent editorial recommendations not directly related to a content. They will never be included in the response of a new style Recommendation API method.

{
"Type": 0,
"ID": 0,
"ItemData": {},
"EditorialUrl": “http://server:port/path/page.htmel”
}

{
"Type": 0,
"ID": 0,
"ItemData": {
"Url": "",
"Width": 0,
"Type": 0,
"ID": 0,
"Height": 0
},
"EditorialUrl": “http://server:port/path/page.html”
}
<br />
<br />

[[Category:OpenGVP|Documentation]]
Bureaucrats, editor
349

edits

Navigation menu