Difference between revisions of "GetRecoms"
Line 70: | Line 70: | ||
|Returns= | |Returns= | ||
− | Returns a JSON object containing a | + | Returns a JSON object containing a list of Catalog Items: |
'''Example:''' | '''Example:''' | ||
Line 76: | Line 76: | ||
{ | { | ||
− | : <span style="color: #a11;">"Content | + | : <span style="color: #a11;">"Content"</span>: [ |
− | + | :: Array of [[CatalogItem]] objects | |
− | + | :: ] | |
− | |||
− | |||
− | |||
− | :: | ||
− | :: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
Revision as of 14:52, 2 October 2015
Description
This method maps the Recom API method introduced in OpenGVP 3.0 for integration with GVP through iTaas (named GetRecoms too). 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 source type enums, 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 (Content Type enum, optional)
- Code for the content type to filter. Default is 0.
- catalogType (List of Catalog Type enums, optional)
- A comma-separated list of desired catalog types 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 Filter Type enums, optional)
- A comma-separated list of desired filter types to apply to VoD and LinearTV recommendations. This is a new parameter added in OpenGVP 3.2. Default is 0.
- timeFilterType (List of Time Filter Type enums, optional)
- A comma-separated list of desired time filter types 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
- ]
}
Exceptions
Caching
This method is not cached.
Known issues
- None
Version history
TO BE COMPLETED