Difference between revisions of "GetCatalogItems"

From Gvp-public
Jump to navigation Jump to search
(Created page with "{{Api_Method_Spec| Description=This method has to return an ordered list of EditorialContent. This method will take into account the Start and End Date of the Content, to...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Api_Method_Spec|
 
{{Api_Method_Spec|
Description=This method has to return an ordered list of [[EditorialContent]].
+
Description= New method in UNIAPI to retrieve the Catalog Items based on the IDs for a specific [[CatalogItemType]].
  
This method will take into account the Start and End Date of the Content, to filter out everything. Also will take into account the ordering of the elements defined in the MIB Channel Editorial Contents block.
+
Take into account the device availability
  
'''Important: It won't filter by Adult property, as adult contents must only be linked to adult channels.'''
+
* Movies: take into account movie availability, movie status and availability window.
 +
* Subscriptions:
 +
** Take into account Start Date and End Date and Status.
 +
** Take into account Subscription type (TEF, NONTEF, Both).
 +
* Live Channels: Status (Active) and live channel device availability
  
It will return ALL the EditorialContents (either they have catalog item associated or not; or either the editorial content has an image linked or not).
+
The method accept just one type of Catalog per request and multiple CatalogId's as a list. It means that the user can't request ID's from different Catalog Types.
  
 +
 
|Parameters=
 
|Parameters=
 
{{Api_Parameter|
 
{{Api_Parameter|
Line 16: Line 21:
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
ParamName=offset
+
ParamName=catalogItemTypeId
 
|ParamType=int
 
|ParamType=int
|ParamRequired=optional
+
|ParamRequired=required
|ParamDescription=The offset number of the returned values for this request
+
|ParamDescription=Id type of the catalog desired
 
}}
 
}}
 
{{Api_Parameter|
 
{{Api_Parameter|
ParamName=limit
+
ParamName=catalogItemIds
|ParamType=int
+
|ParamType=String
|ParamRequired=optional
 
|ParamDescription=The limit number of values for this request
 
}}
 
{{Api_Parameter|
 
ParamName=channelId
 
|ParamType=int
 
 
|ParamRequired=required
 
|ParamRequired=required
|ParamDescription=The channel id that want to return the editorial content registered inside then.
+
|ParamDescription=Array of catalogItemIds desired
 
}}
 
}}
 
  
  
 
|Returns=
 
|Returns=
Returns a JSON object containing an array of [[EditorialContent]].
+
Returns a JSON object containing an array of [[CatalogItem]].
  
 
'''Example:'''
 
'''Example:'''
  
 
{
 
{
:   "Offset": 0,
+
:     "CatalogItemId": 565,
:   "Limit": 100,
+
:     "CatalogItemType": 1,
:   "Count": 6,
+
:     "Title": "Juego asesino",
:   "List":  
+
:     "Keywords": null,
::        [ Array of [[EditorialContent]] List ]
+
:      "Cast": "James Spader,Keanu Reeves,Marisa Tomei,Joe Charbanic ",
 +
:      "IsAdult": false,
 +
:      "AgeRating": "NR 18",
 +
:      "T9Title": "5834602737466",
 +
:      "Genres": "Tenis",
 +
:      "Images": [
 +
::        Array of [[Image]]
 +
:      ],
 +
:      "ImageUrl": null,
 +
:      "ResizableImages": [
 +
::        Array of [[Image]]
 +
:      ],
 +
:      "ExtraMetadata": {
 +
::        Object of [[ExtraMetaData]]
 +
:      },
 +
:      "StartDate": -2208992400,
 +
:      "EndDate": 2524604400,
 +
:      "ShortDescription": "El agente del FBI Joel Campbell ha sido uno de los mejores cazadores de asesinos en serie de Los Ángeles. Un año después de retirarse, en el edificio de apartamentos en el que vive, una mujer aparece asesinada.",
 +
:      "ProductType": [[ProductType]],
 +
:      "Quality": 2,
 +
:      "StatusDate": 1262300400
 
}
 
}
  

Latest revision as of 13:33, 24 March 2015

Description

New method in UNIAPI to retrieve the Catalog Items based on the IDs for a specific CatalogItemType.

Take into account the device availability

  • Movies: take into account movie availability, movie status and availability window.
  • Subscriptions:
    • Take into account Start Date and End Date and Status.
    • Take into account Subscription type (TEF, NONTEF, Both).
  • Live Channels: Status (Active) and live channel device availability

The method accept just one type of Catalog per request and multiple CatalogId's as a list. It means that the user can't request ID's from different Catalog Types.

Parameters

  • token (String, required)
A valid token for identifying the API session context. The token can be anonymous or logged.
  • catalogItemTypeId (int, required)
Id type of the catalog desired
  • catalogItemIds (String, required)
Array of catalogItemIds desired


Returns

Returns a JSON object containing an array of CatalogItem.

Example:

{

"CatalogItemId": 565,
"CatalogItemType": 1,
"Title": "Juego asesino",
"Keywords": null,
"Cast": "James Spader,Keanu Reeves,Marisa Tomei,Joe Charbanic ",
"IsAdult": false,
"AgeRating": "NR 18",
"T9Title": "5834602737466",
"Genres": "Tenis",
"Images": [
Array of Image
],
"ImageUrl": null,
"ResizableImages": [
Array of Image
],
"ExtraMetadata": {
Object of ExtraMetaData
},
"StartDate": -2208992400,
"EndDate": 2524604400,
"ShortDescription": "El agente del FBI Joel Campbell ha sido uno de los mejores cazadores de asesinos en serie de Los Ángeles. Un año después de retirarse, en el edificio de apartamentos en el que vive, una mujer aparece asesinada.",
"ProductType": ProductType,
"Quality": 2,
"StatusDate": 1262300400

}


Exceptions

None


Caching

This method is cached.


Known issues

None


Version history

API Version Number Change description Changes author
3.0 Initial method design Ricardo Calvo


See also