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

Next revision
Previous revision
en:tvip_json_middleware_api:2 [2018/04/17 05:52] – created Egor Danilenkoen:tvip_json_middleware_api:2 [2025/09/12 09:48] (current) – [Feeds] Курбатова Анастасия
Line 1: Line 1:
-====== TVIP JSON Middleware API v1 ======+====== TVIP JSON Middleware API v2 ======
  
 {{ :en:tvip_json_middleware_api:middleware_scheme.svg |}} {{ :en:tvip_json_middleware_api:middleware_scheme.svg |}}
Line 239: Line 239:
 | **enabled**     | Boolean | Yes | True if subscribrictions are active.              | | **enabled**     | Boolean | Yes | True if subscribrictions are active.              |
 | **contract**    | String  | No  | Contract information                              | | **contract**    | String  | No  | Contract information                              |
-\\ + 
-\\+=====  Feeds ===== 
 + 
 +Get information about feeds on home srceen. 
 + 
 +Request: 
 +<code>GET ${TVIPAPI_BASE_URL}/tvipapi/json/feeds/{device-class}.json</code> 
 + 
 +Response: 
 +<code javascript> 
 +{ 
 +  "method" : "feeds", 
 +  "status" : 200, 
 +  "response" : { 
 +  "feeds": [ 
 +      { 
 +    "id": 1,  
 +    "type": "PROVISIONING_BANNER", 
 +    "focusable": true, 
 +    "card_size": {"width": 1920, "height": 180}, 
 +                        "expanded": false, 
 +                        "show_item_title": false 
 +  }, 
 +      { 
 +    "id": 2,  
 +    "type": "APPS", 
 +    "focusable": true, 
 +    "title": "Apps", 
 +    "card_size": {"width": 240, "height": 135}, 
 +                        "expanded": false, 
 +                        "show_item_title": true 
 +  }, 
 + { 
 +    "id": 3,  
 +    "type": "CHANNELS", 
 +    "focusable": true, 
 +    "title": "Channels", 
 +    "card_size": {"width": 416, "height": 234}, 
 +                        "expanded": false, 
 +                        "show_item_title": true 
 +  }, 
 + { 
 +    "id": 4,  
 +    "type": "CCTV", 
 +    "focusable": true, 
 +    "title": "CCTV", 
 +    "card_size": {"width": 416, "height": 234}, 
 +                        "expanded": false, 
 +                        "show_item_title": true 
 +  }, 
 +                { 
 +    "id": 5,  
 +    "type": "SERVERS", 
 +    "focusable": true, 
 +    "title": "Server generated feed", 
 +    "card_size": {"width": 100, "height": 180}, 
 +                        "expanded": false, 
 +                        "show_item_title": true 
 +  } 
 +        ] 
 +      } 
 +  ] 
 +} 
 + 
 +} 
 +</code> 
 + 
 +Feed structure: 
 +^Field: ^Type ^Req. ^Description | 
 +| **id** | Int  | Yes | Unique id.  | 
 +| **type** | String | Yes | [enum] "SERVERS" for every feed generated on server, predefined: "PROVISIONING_BANNER", "APPS", "CHANNELS", "CCTV"   | 
 +| **focusable** | Boolean | Yes, default = true | If user can focus on the feed | 
 +| **title** | String | No | The title of the feed | 
 +| **card_size** | Size | 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 | 
 +| **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): 
 + 
 +  * landscape_poster: 416 x 234 - default for "CHANNELS", "CCTV" 
 +  * portrait_poster: 240 x 360 
 +  * big_portrait_poster: 460 x 700 
 +  * app_logo: 240 x 135 - default for  "APPS" 
 +  * default_banner: 1920 x 180 - default for "PROVISIONING_BANNER" 
 +  * wide_banner: 1800 x 340  
 + 
 +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 ======
Line 303: Line 450:
 </code> </code>
  
-**channels_version** defines version or timestamp or current channel list. If this value is the same as on previous request, playlist will be updated on the device.\\+**channels_version** defines version or timestamp of current channel list. If this value is the same as on previous request, playlist will not be updated on the device.\\
 **channels_hash** unique hash of available channels, used in short epg\\ **channels_hash** unique hash of available channels, used in short epg\\
 **epg_version** defines version or timestamp or current EPG data. If this value is the same as on previous request, EPG will be considered the same.\\ **epg_version** defines version or timestamp or current EPG data. If this value is the same as on previous request, EPG will be considered the same.\\
Line 577: Line 724:
  
  
-This command loads vod tags for requested places. Now boxies load **'primary'** and **'secondary'** tag lists.+This command loads vod tags for requested places. Now boxies load only **'primary'** tag list.
  
 Request: Request:
Line 657: Line 804:
  
  
-This command loads vod сategories for requested places. Now boxies load **'primary'** and **'secondary'** category lists.+This command loads vod сategories for requested places. Now boxies load only **'primary'** list.
  
 Request: Request:
en/tvip_json_middleware_api/2.1523944366.txt.gz · Last modified: by Egor Danilenko

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki