Difference between revisions of "GetNodeRecommendations"
(Created page with "{{Api_Method_Spec| Description=Get a Recommendation from the GVP Platform using many data information to get a personal content to present for the user. This method was create...") |
|||
(18 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Api_Method_Spec| | {{Api_Method_Spec| | ||
− | Description=Get a Recommendation from the GVP Platform | + | Description=Get a Recommendation from the GVP Platform. The GetNodeRecommendations is a ByPass method to use the OpenGVP to get all contents analysed and that is the recommendation for the connected user. |
+ | |||
+ | The suggestion is made in the OpenGVP and sent to the UNIAPI in a JSON format. | ||
+ | All kinds of recommendation are separated by Sources. Each source represent a kind of content that are recommended. | ||
+ | |||
+ | 1 - MostViewed | ||
+ | |||
+ | 2 - BestRated | ||
+ | |||
+ | 3 - Personal | ||
+ | |||
+ | 4 - Editorial | ||
+ | |||
+ | Results are presented in groups inside a ViewSet. Each group of ViewSet represent each source. In the request, a parameter SOURCE can be defined to filter the recommended content, for exemple, if the request wants only the MostViewed Recommendation, send 1 in the source parameter. This filed accept all values (1,2,3,4) separated by comma. | ||
+ | |||
+ | The related methods are: | ||
− | |||
- [[GetFullView]] | - [[GetFullView]] | ||
+ | |||
- [[GetNodeRecommendations]] | - [[GetNodeRecommendations]] | ||
− | - [[ | + | |
− | - [[ | + | - [[GetRootRecommendationsByView]] |
+ | |||
+ | - [[GetRootRecommendationsCombined]] | ||
And the legacy method: | And the legacy method: | ||
Line 12: | Line 29: | ||
- [[GetUserRecommendations]] | - [[GetUserRecommendations]] | ||
− | |||
− | |||
− | |||
− | + | Notes: The OpenGVP can be active/desactive and configured in each Environment and Instance to be used. | |
+ | GetNodeRecommendations can be used in some node of channels, since from RootChannel and others. | ||
Line 26: | Line 41: | ||
|ParamRequired=required | |ParamRequired=required | ||
|ParamDescription=A valid token for identifying the API session context. The token can be anonymous or logged. | |ParamDescription=A valid token for identifying the API session context. The token can be anonymous or logged. | ||
+ | }} | ||
+ | {{Api_Parameter| | ||
+ | ParamName=channelId | ||
+ | |ParamType=int | ||
+ | |ParamRequired=required | ||
+ | |ParamDescription=A number of a channel Id that wants to get a recommendation. | ||
+ | }} | ||
+ | {{Api_Parameter| | ||
+ | ParamName=num | ||
+ | |ParamType=int | ||
+ | |ParamRequired=optional | ||
+ | |ParamDescription=Quantity of recommendation wants to be returned. Each source will return the quantity specified by num parameter. | ||
+ | }} | ||
+ | {{Api_Parameter| | ||
+ | ParamName=sources | ||
+ | |ParamType=int | ||
+ | |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) | ||
+ | }} | ||
+ | {{Api_Parameter| | ||
+ | ParamName=contentType | ||
+ | |ParamType=int | ||
+ | |ParamRequired=optional | ||
+ | |ParamDescription=Number that indicates the content type of the recommendation | ||
+ | 0 - Any: It returns both Movie and Series | ||
+ | 1 - Movie: Used for movies | ||
+ | 2 - Series: Used for TV series | ||
+ | |||
+ | |||
+ | }} | ||
+ | {{Api_Parameter| | ||
+ | ParamName=catalogType | ||
+ | |ParamType=int | ||
+ | |ParamRequired=optional | ||
+ | |ParamDescription=CatalogType: Number that indicates the sub-catalog to retrieve recommendations from (Subscrition or transactional) | ||
+ | 0 - Any: Transactional or subscription (hired by the user). Default for getNodeRecommendations and GetFullView | ||
+ | 1 - Subscription: Contents from subscriptions rented by the user (and inside the subscription sub-catalog). Default for GetRotRecommendationsCombined and GetRootREcommendationsByView | ||
+ | 2 - Transactional: Contents from transactional sub-catalog | ||
}} | }} | ||
|Returns= | |Returns= | ||
− | Returns a JSON object containing a JSON with the personal recommendation as | + | Returns a JSON object containing a JSON with the personal recommendation as SimpleItem. |
'''Example:''' | '''Example:''' | ||
{ | { | ||
− | |||
− | |||
− | |||
: <span style="color: #a11;">"Content"</span>: { | : <span style="color: #a11;">"Content"</span>: { | ||
− | :: | + | :: <span style="color: #a11;">"ViewSet"</span>: { |
+ | ::: <span style="color: #a11;">"1"</span>: [ | ||
+ | :::: Array of [[SimpleItem]] objects | ||
+ | ::: ] | ||
+ | ::: <span style="color: #a11;">"2"</span>: [ | ||
+ | :::: Array of [[SimpleItem]] objects | ||
+ | ::: ] | ||
+ | ::: <span style="color: #a11;">"3"</span>: [ | ||
+ | :::: Array of [[SimpleItem]] objects | ||
+ | ::: ] | ||
+ | ::: <span style="color: #a11;">"4"</span>: [ | ||
+ | :::: Array of [[SimpleItem]] objects | ||
+ | ::: ] | ||
+ | :: } | ||
: } | : } | ||
} | } | ||
+ | |||
|Exceptions= | |Exceptions= | ||
Line 58: | Line 122: | ||
! Changes author | ! Changes author | ||
{{!}}- valign="top" | {{!}}- valign="top" | ||
− | ! 2. | + | ! 2.3 |
{{!}} Initial method design | {{!}} Initial method design | ||
{{!}} Harley Cabral | {{!}} Harley Cabral | ||
Line 64: | Line 128: | ||
|SeeAlso= | |SeeAlso= | ||
+ | * [[GetRootRecommendationsByView]] | ||
+ | * [[GetRootRecommendationsCombined]] | ||
+ | * [[GetUserRecommendations]] | ||
}} | }} |
Latest revision as of 09:33, 13 July 2015
Description
Get a Recommendation from the GVP Platform. The GetNodeRecommendations is a ByPass method to use the OpenGVP to get all contents analysed and that is the recommendation for the connected user.
The suggestion is made in the OpenGVP and sent to the UNIAPI in a JSON format. All kinds of recommendation are separated by Sources. Each source represent a kind of content that are recommended.
1 - MostViewed
2 - BestRated
3 - Personal
4 - Editorial
Results are presented in groups inside a ViewSet. Each group of ViewSet represent each source. In the request, a parameter SOURCE can be defined to filter the recommended content, for exemple, if the request wants only the MostViewed Recommendation, send 1 in the source parameter. This filed accept all values (1,2,3,4) separated by comma.
The related methods are:
- GetRootRecommendationsByView
- GetRootRecommendationsCombined
And the legacy method:
Notes: The OpenGVP can be active/desactive and configured in each Environment and Instance to be used.
GetNodeRecommendations can be used in some node of channels, since from RootChannel and others.
Parameters
- token (String, required)
- A valid token for identifying the API session context. The token can be anonymous or logged.
- channelId (int, required)
- A number of a channel Id that wants to get a recommendation.
- num (int, optional)
- Quantity of recommendation wants to be returned. Each source will return the quantity specified by num parameter.
- sources (int, optional)
- Number separated by comma that represent a kind of content wants to be filter the result. (1 - MostViewed, 2 - BestRated, 3 - Personal, 4 - Editorial)
- contentType (int, optional)
- Number that indicates the content type of the recommendation
0 - Any: It returns both Movie and Series 1 - Movie: Used for movies 2 - Series: Used for TV series
- catalogType (int, optional)
- CatalogType: Number that indicates the sub-catalog to retrieve recommendations from (Subscrition or transactional)
0 - Any: Transactional or subscription (hired by the user). Default for getNodeRecommendations and GetFullView 1 - Subscription: Contents from subscriptions rented by the user (and inside the subscription sub-catalog). Default for GetRotRecommendationsCombined and GetRootREcommendationsByView 2 - Transactional: Contents from transactional sub-catalog
Returns
Returns a JSON object containing a JSON with the personal recommendation as SimpleItem.
Example:
{
- "Content": {
- "ViewSet": {
- "1": [
- Array of SimpleItem objects
- ]
- "2": [
- Array of SimpleItem objects
- ]
- "3": [
- Array of SimpleItem objects
- ]
- "4": [
- Array of SimpleItem objects
- ]
- "1": [
- }
- "ViewSet": {
- }
}
Exceptions
- None
Caching
This method is not cached.
Known issues
- None
Version history
API Version Number | Change description | Changes author |
---|---|---|
2.3 | Initial method design | Harley Cabral |