This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:tvip_json_middleware_api:2 [2025/04/30 15:35] Варвара Синицкая Add feeds |
en:tvip_json_middleware_api:2 [2025/04/30 15:59] (current) Варвара Синицкая |
||
---|---|---|---|
Line 314: | Line 314: | ||
| **focusable** | Boolean | Yes | If user can focus on the feed - true by default | | | **focusable** | Boolean | Yes | If user can focus on the feed - true by default | | ||
| **title** | String | Yes | The title of the feed | | | **title** | String | Yes | The title of the feed | | ||
- | | **card_size** | Object | Yes | The width and height of item image card - under the table watch more info | | + | | **card_size** | Size | Yes | The width and height of item image card - under the table watch more info | |
| **mark_position** | String | Yes | [enum] Position of the mark on the card, available values: "TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT", "TOP_LEFT" by default | | | **mark_position** | String | Yes | [enum] Position of the mark on the card, available values: "TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT", "TOP_LEFT" by default | | ||
+ | |||
+ | Size structure: | ||
+ | ^Field: ^Type ^Req. ^Description | | ||
+ | | **width** | Int | Yes | Image card width | | ||
+ | | **height** | Int | Yes | Image card height | | ||
card size available (can choose only from these ones): | card size available (can choose only from these ones): | ||
Line 327: | Line 332: | ||
for "PROVISIONING_BANNER" client overrides the size taking it from provisioning for "APPS" let choose between app_logo and landscape_poster | for "PROVISIONING_BANNER" client overrides the size taking it from provisioning for "APPS" let choose between app_logo and landscape_poster | ||
+ | |||
+ | ===== Feed items ===== | ||
+ | Get items of the feed. | ||
+ | |||
+ | Request: | ||
+ | <code>GET ${TVIPAPI_BASE_URL}/tvipapi/json/feeds/{feed_id}/items.json</code> | ||
+ | |||
+ | Response: | ||
+ | <code javascript> | ||
+ | { | ||
+ | "method" : "feeds", | ||
+ | "status" : 200, | ||
+ | "response" : { | ||
+ | "feed_id": 1, | ||
+ | "items": [ | ||
+ | { | ||
+ | "title": "Card", | ||
+ | "subtitle": "info", | ||
+ | "deeplink": "vod/?movie=1", | ||
+ | "progress": {"total": 7200, "elapsed": 3000}, | ||
+ | "mark": "hit", | ||
+ | "background_image": "url1", | ||
+ | "background_video": "url2", | ||
+ | "image": "url3", | ||
+ | }, | ||
+ | { | ||
+ | "title": "Title", | ||
+ | "subtitle": null, | ||
+ | "deeplink": "vod/?movie=2", | ||
+ | "progress": null, | ||
+ | "mark": null, | ||
+ | "background_image": null, | ||
+ | "background_video": null, | ||
+ | "image": "url3", | ||
+ | }, | ||
+ | ] | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | Item structure: | ||
+ | ^Field: ^Type ^Req. ^Description | | ||
+ | | **title** | String | Yes | Item title | | ||
+ | | **subtitle** | String | No | Item subtitle | | ||
+ | | **deeplink** | String | Yes | The deeplink with action (system uri / url) | | ||
+ | | **progress** | Progress | No | Only fo continue feed. Shows total and elapsed time of the video | | ||
+ | | **mark** | String | No | The one word showing above item card | | ||
+ | | **background_image** | String | No | The image url to show on the background when item is focused | | ||
+ | | **background_video** | String | No | The video url to play on the background when item is focused | | ||
+ | | **image** | String | Yes | The image url for the item card | | ||
+ | |||
+ | Progress structure: | ||
+ | ^Field: ^Type ^Req. ^Description | | ||
+ | | **total** | Int | Yes | Item (video) duration in seconds | | ||
+ | | **elapsed** | Int | Yes | The seconds elapsed from start to pause | | ||
====== Content requests ====== | ====== Content requests ====== |