Difference between revisions of "GetRecoms"

From Gvp-public
Jump to navigation Jump to search
Line 83: Line 83:
 
}
 
}
  
 +
'''Full Example:'''
 +
{
 +
:  "StatusCode": 0,
 +
:  "Severity": 1,
 +
:  "StatusMessage": "OK",
 +
:  "Content": [
 +
:    {
 +
::      "CatalogItemId": 1388,
 +
::      "CatalogItemType": 1,
 +
::      "Title": "Gladiator",
 +
::      "Keywords": null,
 +
::      "Cast": "Connie Nielsen,Joaquin Phoenix,Ridley Scott,Russell Crowe",
 +
::      "IsAdult": false,
 +
::      "AgeRating": "12",
 +
::      "T9Title": "452342867",
 +
::      "Genres": "Documental,EN - Vacaciones",
 +
::      "ResizableImages": [
 +
::        {
 +
:::          "ID": 1,
 +
:::          "Url": "http://media-ottcert.labs.gvp.telefonica.com/storagearea0/IMAGES/00/00/02/23792_17F5254C9235CA8C.jpg",
 +
:::          "Width": 1280,
 +
:::          "Height": 800,
 +
:::          "Type": 1,
 +
:::          "Ext": ".jpg"
 +
::        }
 +
::      ],
 +
::      "ExtraMetadata": {
 +
:::        "Stars": 2.2,
 +
:::        "Audience": 613,
 +
:::        "Distributor": "MCA-PROV-PLAYLIST",
 +
:::        "CommercializationType": 5,
 +
:::        "Subscriptions": [
 +
::::          1275,
 +
::::          1501,
 +
::::          1525
 +
:::        ],
 +
:::        "Source":1,
 +
:::        "Trailers": []
 +
::      },
 +
::      "StartDate": 946677600,
 +
::      "EndDate": 1633907340,
 +
::      "ShortDescription": "Maximus is a powerful Roman general, loved by the people and the aging Emperor...",
 +
::      "ProductType": 2,
 +
::      "Quality": 1,
 +
::      "StatusDate": 1443442098
 +
:    }
 +
:  ]
 +
}
  
  
 
|Exceptions=
 
|Exceptions=
 
<span style="color: #a11;"></span>
 
<span style="color: #a11;"></span>
 
+
N/A
  
 
|Cache=
 
|Cache=

Revision as of 09:46, 3 October 2015

Description

This method maps the Recom API method introduced in OpenGVP 3.0 for integration with GVP through iTaas (named GetRecoms too), in order to deprecate other methods as GetNodeRecommendations, GetRootRecommendationsCombined, GetFullView, GetRootRecommendationsByView, GetUserRecommendations. As per GVP3.2, it manages and returns exclusively movies and TV series. It means that Banners (Editorial Recommendations non-related to a content) are not returned by this method.

Parameters

  • token (String, required)
A valid token for identifying the API session context. The token can be anonymous or logged.
  • channelId (int, optional)
Id of the channel that wants to return the object information. If not passed or it takes the zero value, that is, the Root channel is used. This parameter only applies to VoD recommendations, that is, when the catalogType contains TVoD+SVOD User, SVoD User, SVoD or TVoD.
  • num (int, optional)
Quantity of recommendation that wants to be returned. Number of items desired per source/view (when groupBySource=True) or overall number of items desired (when groupBySource=False). If not passed, the default value is:
5, when groupBySource=True;
50, when groupBySource=False.
  • sources (list of int, optional)
A comma-separated list of desired source types to get recommendations from. In this case the engine will try its best to provide recommendations for all the requested views (though it might be possible that some views return fewer items than the requested number).
If this input param is not passed, a default value is used, according to the next criteria: If the instance is associated to a VoD catalog, VoD recommendations are requested (the catalogType is different than 8) and the channelId to use is the Root channel, the default value used is 4,3,1,2.
Otherwise, the default value used is 3,1,2.
If the list of sources include the 4 value (editorial recommendation), this source is processed firstly.
  • contentType (int, optional)
Code for the ContentType to filter. Default is 0.
  • catalogType (List of int, optional)
A comma-separated list of desired catalogType to get recommendations from. Some combination of catalog types are not allowed:
0=TVoD+SVoD User and 3=SVoD cannot be given at the same time.
1=SVoD User and 3=SVoD cannot be given at the same time.
  • groupBySource (boolean, optional)
If the groupBySource=True, the internal OpenGVP result will contain a ViewSet If the groupBySource=False, the internal OpenGVP result will contain a ItemList. This has no effect in UNI API response, as a List of CatalogItems is always returned.
Defaults in server to: True.
  • filterType (List of int, optional)
A comma-separated list of desired filterType to apply to VoD and LinearTV recommendations. This is a new parameter added in OpenGVP 3.2. Default is 0.
  • timeFilterType (List of int, optional)
A comma-separated list of desired timeFilterType to apply to LinearTV recommendations.
This parameter is ignored unless the catalogType parameter does include the value 8=LinearTV (anyway, although it is ignored, it must contain a correct value).
Take into account that when this type of filtering is requested, the recommendations will be ordered by relevance as usually, they will not ordered by time.
This is a new parameter added in OpenGVP 3.2. Default is 0.


Returns

Returns a JSON object containing a list of Catalog Items:

Example:


{

"Content": [
Array of CatalogItem objects
]

}

Full Example: {

"StatusCode": 0,
"Severity": 1,
"StatusMessage": "OK",
"Content": [
{
"CatalogItemId": 1388,
"CatalogItemType": 1,
"Title": "Gladiator",
"Keywords": null,
"Cast": "Connie Nielsen,Joaquin Phoenix,Ridley Scott,Russell Crowe",
"IsAdult": false,
"AgeRating": "12",
"T9Title": "452342867",
"Genres": "Documental,EN - Vacaciones",
"ResizableImages": [
{
"ID": 1,
"Url": "http://media-ottcert.labs.gvp.telefonica.com/storagearea0/IMAGES/00/00/02/23792_17F5254C9235CA8C.jpg",
"Width": 1280,
"Height": 800,
"Type": 1,
"Ext": ".jpg"
}
],
"ExtraMetadata": {
"Stars": 2.2,
"Audience": 613,
"Distributor": "MCA-PROV-PLAYLIST",
"CommercializationType": 5,
"Subscriptions": [
1275,
1501,
1525
],
"Source":1,
"Trailers": []
},
"StartDate": 946677600,
"EndDate": 1633907340,
"ShortDescription": "Maximus is a powerful Roman general, loved by the people and the aging Emperor...",
"ProductType": 2,
"Quality": 1,
"StatusDate": 1443442098
}
]

}


Exceptions

N/A


Caching

This method is not cached.


Known issues

  • None


Version history

API Version Number Change description Changes author
3.2 Initial method design Alberto Los Santos


See also