User Tools

Site Tools


en:tvip_json_middleware_api:2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tvip_json_middleware_api:2 [2025/04/30 12:35] – Add feeds Варвара Синицкаяen:tvip_json_middleware_api:2 [2025/09/12 09:48] (current) – [Feeds] Курбатова Анастасия
Line 256: Line 256:
       {       {
     "id": 1,      "id": 1, 
-    "type": DEFAULT, +    "type": "PROVISIONING_BANNER",
-    "subtype": PROVISIONING_BANNER,+
     "focusable": true,     "focusable": true,
-    "title": "", 
     "card_size": {"width": 1920, "height": 180},     "card_size": {"width": 1920, "height": 180},
-    "mark_position": TOP_LEFT,+                        "expanded": false, 
 +                        "show_item_title": false
   },   },
       {       {
     "id": 2,      "id": 2, 
-    "type": DEFAULT, +    "type": "APPS",
-    "subtype": APPS,+
     "focusable": true,     "focusable": true,
     "title": "Apps",     "title": "Apps",
     "card_size": {"width": 240, "height": 135},     "card_size": {"width": 240, "height": 135},
-    "mark_position": TOP_LEFT,+                        "expanded": false, 
 +                        "show_item_title": true
   },   },
  {  {
     "id": 3,      "id": 3, 
-    "type": DEFAULT, +    "type": "CHANNELS",
-    "subtype": CHANNELS,+
     "focusable": true,     "focusable": true,
     "title": "Channels",     "title": "Channels",
     "card_size": {"width": 416, "height": 234},     "card_size": {"width": 416, "height": 234},
-    "mark_position": TOP_LEFT,+                        "expanded": false, 
 +                        "show_item_title": true
   },   },
  {  {
     "id": 4,      "id": 4, 
-    "type": DEFAULT, +    "type": "CCTV",
-    "subtype": CCTV,+
     "focusable": true,     "focusable": true,
     "title": "CCTV",     "title": "CCTV",
     "card_size": {"width": 416, "height": 234},     "card_size": {"width": 416, "height": 234},
-    "mark_position": TOP_LEFT,+                        "expanded": false, 
 +                        "show_item_title": true
   },   },
- {+                {
     "id": 5,      "id": 5, 
-    "type": DEFAULT, +    "type": "SERVERS",
-  "subtype": Continue,+
     "focusable": true,     "focusable": true,
-    "title": "Continue watching", +    "title": "Server generated feed", 
-    "card_size": {"width": 416, "height": 234}, +    "card_size": {"width": 100, "height": 180}, 
-   "mark_position": BOTTOM_LEFT,+                        "expanded": false, 
 +                        "show_item_title": true
   }   }
         ]         ]
Line 310: Line 309:
 ^Field: ^Type ^Req. ^Description | ^Field: ^Type ^Req. ^Description |
 | **id** | Int  | Yes | Unique id.  | | **id** | Int  | Yes | Unique id.  |
-| **type** | String | Yes | [enum] default or additional feed, "DEFAULT" by default   | +| **type** | String | Yes | [enum] "SERVERS" for every feed generated on server, predefined: "PROVISIONING_BANNER", "APPS", "CHANNELS", "CCTV"   | 
-| **subtype** | String  | Yes  | [enum] Type of the feed, defaults are: "PROVISIONING_BANNER", "APPS", "CHANNELS", "CCTV", "CONTINUE"     | +| **focusable** | Boolean | Yes, default = true | If user can focus on the feed | 
-| **focusable** | Boolean | Yes | If user can focus on the feed - true by default | +| **title** | String | No | The title of the feed | 
-| **title** | String | Yes | The title of the feed | +| **card_size** | Size | Yes | The width and height of item image card - under the table watch more info | 
-| **card_size** | Object | Yes | The width and height of item image card - under the table watch more info | +| **expanded** | Boolean | Yes, default = false | Whether feed needs more space to show it's background | 
-| **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 |+| **show_item_title** | Boolean | Yes, default = true | If true then item title is always shown under the item card, if false then title is shown in the center of item card when the card image is not loaded | 
 + 
 +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):
  
-  * landscape_poster: 416 x 234 - default for "CHANNELS", "CCTV", "CONTINUE" +  * landscape_poster: 416 x 234 - default for "CHANNELS", "CCTV"
   * portrait_poster: 240 x 360   * portrait_poster: 240 x 360
   * big_portrait_poster: 460 x 700   * big_portrait_poster: 460 x 700
Line 326: Line 330:
   * wide_banner: 1800 x 340    * wide_banner: 1800 x 340 
  
-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 (flutter app) 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 ======
en/tvip_json_middleware_api/2.1746016558.txt.gz · Last modified: by Варвара Синицкая

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki