Difference between revisions of "GetRecoms"

From Gvp-public
Jump to navigation Jump to search
Line 1: Line 1:
 
{{Api_Method_Spec|
 
{{Api_Method_Spec|
Description=This method returns the recommendations for the user. Unify openGVP recommendations method.
+
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=
 
|Parameters=
Line 12: Line 11:
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
ParamName=chennelId
+
ParamName=channelId
 
|ParamType=int
 
|ParamType=int
|ParamRequired=required
+
|ParamRequired=optional
|ParamDescription=Id of the channel that wants to return the object information.
+
|ParamDescription=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.
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
 
ParamName=num
 
ParamName=num
 
|ParamType=int
 
|ParamType=int
|ParamRequired=required
+
|ParamRequired=optional
|ParamDescription=Quantity of recommendation wants to be returned. Each source will return the quantity specified by num parameter.
+
|ParamDescription=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.
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
 
ParamName=sources
 
ParamName=sources
|ParamType=int
+
|ParamType=list of source type enums
|ParamRequired=required
+
|ParamRequired=optional
|ParamDescription=Number separated by comma that represent a kind of content wants to be filter the result. (1 - MostViewed, 2 - BestRated, 3 - Personal, 4 - Editorial)
+
|ParamDescription=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.
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
 
ParamName=contentType
 
ParamName=contentType
|ParamType=int
+
|ParamType=Content Type enum
 
|ParamRequired=optional
 
|ParamRequired=optional
|ParamDescription=Number that indicates the content type of the recommendation
+
|ParamDescription=Code for the content type to filter. Default is 0.
    0 - Any: It returns both Movie and Series
+
 
    1 - Movie: Used for movies
 
    2 - Series: Used for TV series
 
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
 
ParamName=catalogType
 
ParamName=catalogType
|ParamType=int
+
|ParamType=List of Catalog Type enums
 
|ParamRequired=optional
 
|ParamRequired=optional
|ParamDescription=CatalogType: Number that indicates the sub-catalog to retrieve recommendations from (Subscrition or transactional)
+
|ParamDescription=A comma-separated list of desired catalog types to get recommendations from. Some combination of catalog types are not allowed:
    0 - Any: Transactional or subscription (hired by the user). Default for getNodeRecommendations and GetFullView
+
0=TVoD+SVoD User and 3=SVoD cannot be given at the same time.
    1 - Subscription: Contents from subscriptions rented by the user (and inside the subscription sub-catalog). Default for GetRotRecommendationsCombined and GetRootREcommendationsByView
+
1=SVoD User and 3=SVoD cannot be given at the same time.
    2 - Transactional: Contents from transactional sub-catalog
 
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
Line 51: Line 50:
 
|ParamType=boolean
 
|ParamType=boolean
 
|ParamRequired=optional
 
|ParamRequired=optional
|ParamDescription=If the groupBySource=True, the result will contain a ViewSet If the groupBySource=False, the result will contain a ItemList.
+
|ParamDescription=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: false.
+
Defaults in server to: True.
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
 
ParamName=filterType
 
ParamName=filterType
|ParamType=array
+
|ParamType=List of Filter Type enums
 
|ParamRequired=optional
 
|ParamRequired=optional
|ParamDescription=
+
|ParamDescription= 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.
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
 
ParamName=timeFilterType
 
ParamName=timeFilterType
|ParamType=array
+
|ParamType=List of Time Filter Type enums
 
|ParamRequired=optional
 
|ParamRequired=optional
|ParamDescription=
+
|ParamDescription= 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.
 
}}
 
}}
  
Line 95: Line 97:
  
 
|Exceptions=
 
|Exceptions=
<span style="color: #a11;">TO BE COMPLETED</span>
+
<span style="color: #a11;"></span>
  
  

Revision as of 14:49, 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 JSON with the recommendations.

Example:


{

"Content": {
"ViewSet": {
"1": [
Array of SimpleItem (OpenGVP Type) objects
]
"2": [
Array of SimpleItem (OpenGVP Type) objects
]
"3": [
Array of SimpleItem (OpenGVP Type) objects
]
"4": [
Array of SimpleItem (OpenGVP Type) objects
]
}
}

}


Exceptions


Caching

This method is not cached.


Known issues

  • None


Version history

TO BE COMPLETED


See also