Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.78 KB | None | 0 0
  1. openapi: 3.0.0
  2.  
  3. info:
  4. title: API TVN APP
  5. description: Definición de los servicios necesarios para la aplicación de TVN
  6. version: 1.0.0
  7. contact:
  8. name: Álvaro Galindo
  9. email: agalindo@bitban.com
  10.  
  11. servers:
  12. - url: https://www.tvn-2.com/tvn/app/{version}/services
  13. description: Servidor para peticiones contra producción
  14. variables:
  15. version:
  16. enum:
  17. - "1.0"
  18. - "1.1"
  19. - "2.0"
  20. - "2.1"
  21. - "3.0"
  22. default: "1.0"
  23. - url: https://www.tvn-2.com.prebb3.bitban.com/tvn/app/{version}/services
  24. description: Servidor para peticiones contra preproducción
  25. variables:
  26. version:
  27. enum:
  28. - "1.0"
  29. - "1.1"
  30. - "2.0"
  31. - "2.1"
  32. - "3.0"
  33. default: "1.0"
  34.  
  35. paths:
  36.  
  37. # Servicios comunes
  38. /facebook_login.json:
  39. post:
  40. summary: Login con facebook
  41. description: Permite hacer login al usuario a través de Facebook
  42. tags:
  43. - facebook-login
  44. parameters: []
  45. servers:
  46. - url: https://www.tvn-2.com/tvn/facebook_login.json
  47. - url: https://www.tvn-2.com.prebb3.bitban.com/tvn/facebook_login.json
  48. requestBody:
  49. content:
  50. multipart/form-data:
  51. schema: # Request payload
  52. type: object
  53. properties: # Request parts
  54. facebookAccessToken: # Part 1 (string value)
  55. description: Access token provides by Facebook
  56. type: string
  57. example: "EAAOZC94FV3z4BAHHAjJ5YroSRnZBZA2MIMNaIedE0NCSPPRoImjd5V9EGilATOJSslt6SUBuyIdG2cE0nhVtFXu3bdpeTI6pi5iykRZChHEN5TS0BvdO0CquwOVa3d6VZCTTiYKa6TSFvrkSEL1GIAuVgTQmbSwIQjbeQWovbaZAyI4cHmy6AZBa9pUZAVWIXDfngoRZA1tY9EXZAsTZAVZCrZAzD8ZBRXpxzlta2qrZCYVxhiPOgZDZD"
  58. responses:
  59. 200:
  60. description: Login performs successfully
  61. headers:
  62. bb3_session_id:
  63. schema:
  64. type: string
  65. description: Session cookie
  66. a00bcafe07a2851fd5ea7f9a41e4dab0:
  67. schema:
  68. type: integer
  69. description: User id cookie.
  70.  
  71. /app.json:
  72. get:
  73. description: Get app info to configure the application.
  74. tags:
  75. - general
  76. parameters:
  77. - $ref: '#/components/parameters/appParam'
  78. responses:
  79. 200:
  80. description: Ok
  81. content:
  82. application/json:
  83. schema:
  84. $ref: '#/components/schemas/App'
  85.  
  86. /content/data/content.json:
  87. get:
  88. description: Datos de un contenido
  89. tags:
  90. - contenido
  91. parameters:
  92. - $ref: '#/components/parameters/appParam'
  93. - $ref: '#/components/parameters/contentParam'
  94. responses:
  95. 200:
  96. description: Ok
  97. content:
  98. application/json:
  99. schema:
  100. type: object
  101. properties:
  102. data:
  103. type: object
  104. $ref: '#/components/schemas/itemComponent'
  105.  
  106. # Servicios de rediseño APP
  107. /top/{contentType}.json:
  108. get:
  109. description: Listado de contenidos más vistos filtrando por tipos
  110. tags:
  111. - rediseño
  112. parameters:
  113. - in: path
  114. description: Tipo de contenido para filtrar la búsqueda
  115. name: contentType
  116. schema:
  117. type: string
  118. enum:
  119. - "NWS"
  120. - "VID"
  121. required: true
  122. - $ref: '#/components/parameters/appParam'
  123. - $ref: '#/components/parameters/limitParam'
  124. responses:
  125. 200:
  126. description: Ok
  127. content:
  128. application/json:
  129. schema:
  130. type: object
  131. properties:
  132. data:
  133. type: array
  134. items:
  135. $ref: '#/components/schemas/itemComponent'
  136. /programs.json:
  137. get:
  138. description: Listado de programas
  139. tags:
  140. - rediseño
  141. parameters:
  142. - $ref: '#/components/parameters/appParam'
  143. responses:
  144. 200:
  145. description: Ok
  146. content:
  147. application/json:
  148. schema:
  149. type: object
  150. properties:
  151. data:
  152. type: object
  153. properties:
  154. results:
  155. type: array
  156. items:
  157. type: object
  158. properties:
  159. entityType:
  160. type: string
  161. example: link
  162. entityValue:
  163. type: string
  164. example: http://www.tvn-2.com/tag/gente_que_inspira/videos
  165. title:
  166. type: string
  167. example: Title
  168. subtitle:
  169. type: string
  170. example: Subtitle
  171. imageUrl:
  172. type: string
  173. example: ""
  174.  
  175. /videos.json:
  176. get:
  177. description: Listado de últimos vídeos publicados
  178. tags:
  179. - rediseño
  180. parameters:
  181. - $ref: '#/components/parameters/appParam'
  182. - $ref: '#/components/parameters/limitParam'
  183. - $ref: '#/components/parameters/pageParam'
  184. responses:
  185. 200:
  186. description: Ok
  187. content:
  188. application/json:
  189. schema:
  190. type: object
  191. properties:
  192. data:
  193. type: array
  194. items:
  195. $ref: '#/components/schemas/itemComponent'
  196.  
  197. # Servicios del catchup
  198.  
  199. /channels.json:
  200. get:
  201. summary: Lista de canales disponibles
  202. description: Devuelve la lista de canales en vivo disponibles, incluyendo su identificador, nombre, icono y URL para obtener la parrilla del canal.
  203. tags:
  204. - catchup
  205. parameters: []
  206. responses:
  207. 200:
  208. description: Ok
  209. content:
  210. application/json:
  211. schema:
  212. $ref: '#/components/schemas/Channel'
  213.  
  214. /grid.json:
  215. get:
  216. summary: Parrilla de programación de un canal
  217. description: Devuelve la parrilla de programación del canal indicado.
  218. tags:
  219. - catchup
  220. parameters:
  221. - name: channelId
  222. description: Identificador del canal
  223. schema:
  224. type: string
  225. in: query
  226. responses:
  227. 200:
  228. description: Ok
  229. content:
  230. application/json:
  231. schema:
  232. $ref: '#/components/schemas/Grid'
  233. 404:
  234. description: El identificador del canal no existe
  235.  
  236. # Servicios del microsite elecciones
  237. /elecciones/dashboard.json:
  238. get:
  239. summary: Listado de secciones y contenido destacado
  240. description: Servicio que devuelve una lista de secciones que se muestran en ese dashboard y un contenido destacado
  241. tags:
  242. - microsite-elecciones
  243. parameters: []
  244. responses:
  245. 200:
  246. description: Ok
  247. content:
  248. application/json:
  249. schema:
  250. $ref: '#/components/schemas/EleccionesDashboard'
  251.  
  252. /elecciones/widget.json:
  253. get:
  254. summary: Esto es una página HTML para devolver directamente un HTML que se edita en la portada
  255. description: Por lo tanto el servicio deberá recibir un identificador de sección y devolver HTML.
  256. tags:
  257. - microsite-elecciones
  258. parameters:
  259. - name: sectionId
  260. description: Identificador de sección
  261. schema:
  262. type: string
  263. in: query
  264. responses:
  265. 200:
  266. description: Ok
  267. content:
  268. application/json:
  269. schema:
  270. $ref: '#/components/schemas/EleccionesWidget'
  271. 404:
  272. description: El identificador de seccion no existe
  273.  
  274. /elecciones/celda_promocion.json:
  275. get:
  276. summary: Nuevo tipo de celda que se crea con el objetivo de promocionar uno de los productos de TVN.
  277. description: El objetivo es promocionar las elecciones o un nuevo programa. Esta celda iría en la portada de la aplicación y aparecería en la segunda posición de portada.
  278. tags:
  279. - microsite-elecciones
  280. parameters: []
  281. responses:
  282. 200:
  283. description: Ok
  284. content:
  285. application/json:
  286. schema:
  287. $ref: '#/components/schemas/EleccionesCeldaPromocion'
  288.  
  289. components:
  290.  
  291. parameters:
  292.  
  293. appParam:
  294. name: app
  295. description: App configuration for the service
  296. in: query
  297. schema:
  298. type: integer
  299. enum:
  300. - "1000" # tvn2
  301. - "1001" # Gran hermano
  302. - "1002" # Esto es guerra
  303. default: "1000"
  304.  
  305. limitParam:
  306. name: limit
  307. description: Límite de elementos a mostrar
  308. in: query
  309. schema:
  310. type: integer
  311. default: 5
  312.  
  313. pageParam:
  314. name: page
  315. description: Número de página
  316. in: query
  317. schema:
  318. type: integer
  319. default: 1
  320.  
  321. contentParam:
  322. name: contentId
  323. description: Identificador de contenido
  324. in: query
  325. schema:
  326. type: string
  327. pattern: '([A-Z0-9]{3})([A-Z0-9]{3})(\d{4})(\d{2})(\d{2})_(\d{4})'
  328.  
  329. schemas:
  330.  
  331. itemComponent:
  332. type: object
  333. properties:
  334. id:
  335. type: string
  336. example: TVNNWS20170415_0050
  337. ico:
  338. type: string
  339. example: PLAY
  340. sectionId:
  341. type: integer
  342. example: 1000100
  343. sectionName:
  344. type: string
  345. example: Nacionales
  346. title:
  347. type: string
  348. example: Jugador de la selección Amílcar Henríquez muere tras balacera en Colón
  349. publishedDate:
  350. type: integer
  351. example: 1492298985
  352. signatureAuthorName:
  353. type: string
  354. example: Redacción de TVN Noticias
  355. html:
  356. type: string
  357. example: https://www.tvn-2.com.prebb3.bitban.com/tvn/app/2/services/content/webview/content.html?contentId=TVNNWS20170415_0050
  358. shareUrl:
  359. type: string
  360. example: https://www.tvn-2.com.prebb3.bitban.com/_11a3ac544
  361. absoluteURL:
  362. type: string
  363. example: https://www.tvn-2.com.prebb3.bitban.com/nacionales/Amilcar-Henriquez-herido-arma-fuego-Seleccion-Nacional-futbol_0_4735026500.html
  364. disqusId:
  365. type: string
  366. example: tvnnoticias
  367. imageUrls:
  368. type: array
  369. items:
  370. $ref: '#/components/schemas/imageComponent'
  371. videoInfo:
  372. $ref: '#/components/schemas/videoComponent'
  373.  
  374. imageComponent:
  375. type: object
  376. properties:
  377. url:
  378. type: string
  379. example: https://www.tvn-2.com.prebb3.bitban.com/videos/noticias/Jugador-Amilcar-Henriquez-balacera-Colon_9695809.jpg
  380. width:
  381. type: integer
  382. example: 192
  383. height:
  384. type: integer
  385. example: 108
  386.  
  387. videoComponent:
  388. type: object
  389. properties:
  390. ooyalaId:
  391. type: string
  392. example: 45M3A0YzE6zl488L4RqJjblJ8tGYnJ9b
  393. ads:
  394. type: array
  395. items:
  396. $ref: '#/components/schemas/Ad'
  397.  
  398. App:
  399. type: object
  400. required:
  401. - ads
  402. - data
  403. properties:
  404. ads:
  405. type: object
  406. required:
  407. - android
  408. - ios
  409. properties:
  410. android:
  411. $ref: '#/components/schemas/AppLayoutDatas'
  412. ios:
  413. $ref: '#/components/schemas/AppLayoutDatas'
  414. data:
  415. type: object
  416. required:
  417. - navigations
  418. - status
  419. properties:
  420. navigations:
  421. type: object
  422. required:
  423. - home
  424. - menu
  425. properties:
  426. home:
  427. type: array
  428. items:
  429. $ref: '#/components/schemas/AppNavigation'
  430. menu:
  431. type: array
  432. items:
  433. $ref: '#/components/schemas/AppNavigation'
  434. status:
  435. type: object
  436. required:
  437. - android
  438. - ios
  439. properties:
  440. android:
  441. $ref: '#/components/schemas/AppStatus'
  442. ios:
  443. $ref: '#/components/schemas/AppStatus'
  444.  
  445.  
  446. AppLayoutDatas:
  447. type: object
  448. properties:
  449. TVN_LAYOUT_HOME:
  450. type: array
  451. items:
  452. $ref: '#/components/schemas/AppAds'
  453. TVN_LAYOUT_LIST:
  454. type: array
  455. items:
  456. $ref: '#/components/schemas/AppAds'
  457. TVN_LAYOUT_PLAYER:
  458. type: array
  459. items:
  460. $ref: '#/components/schemas/AppAds'
  461. TVN_LAYOUT_LOTTERIES:
  462. type: array
  463. items:
  464. $ref: '#/components/schemas/AppAds'
  465. TVN_LAYOUT_TVGRID:
  466. type: array
  467. items:
  468. $ref: '#/components/schemas/AppAds'
  469. TVN_LAYOUT_FEEDEXPLORER:
  470. type: array
  471. items:
  472. $ref: '#/components/schemas/AppAds'
  473. TVN_LAYOUT_FEEDSELECTION:
  474. type: array
  475. items:
  476. $ref: '#/components/schemas/AppAds'
  477. TVN_LAYOUT_READLATER:
  478. type: array
  479. items:
  480. $ref: '#/components/schemas/AppAds'
  481. TVN_LAYOUT_DETAIL:
  482. type: array
  483. items:
  484. $ref: '#/components/schemas/AppAds'
  485.  
  486. AppAds:
  487. type: object
  488. required:
  489. - adUnitId
  490. - type
  491. properties:
  492. adUnitId:
  493. type: string
  494. example: /2259226/app_noticias_home_footer
  495. type:
  496. type: string
  497. example: banner_bottom
  498. offset:
  499. type: string
  500. example: 3
  501. repeat:
  502. type: string
  503. example: 5
  504.  
  505. AppStatus:
  506. type: object
  507. properties:
  508. block:
  509. type: object
  510. properties:
  511. enabled:
  512. type: string
  513. example: "0"
  514. message:
  515. type: string
  516. example: "Mensaje de bloqueo"
  517. url:
  518. type: string
  519. example: "http://www.google.es"
  520. version:
  521. type: object
  522. properties:
  523. enabled:
  524. type: string
  525. example: "1"
  526. message:
  527. type: string
  528. example: "Hola, hemos realizado mejoras a nuestra aplicación para que disfrutes mejor de todo nuestro contenido. Por favor actualiza tu APP"
  529. url:
  530. type: string
  531. example: "https://play.google.com/store/apps/details?id=air.com.tvn.app.mobile.TVNNoticias"
  532. version:
  533. type: string
  534. example: "20161202"
  535.  
  536. AppNavigation:
  537. type: object
  538. required:
  539. - active
  540. - icon
  541. - layoutId
  542. - name
  543. - navigationId
  544. properties:
  545. active:
  546. type: boolean
  547. default: true
  548. icon:
  549. type: string
  550. example: "tabbar-home"
  551. layoutDatas:
  552. type: string
  553. example: "{\"topicId\":\"1000000\"}"
  554. layoutId:
  555. type: string
  556. example: "TVN_LAYOUT_LIST"
  557. name:
  558. type: string
  559. example: "Home"
  560. navigationId:
  561. type: integer
  562. example: 5000100
  563.  
  564. Channel:
  565. type: object
  566. properties:
  567. channelId:
  568. type: string
  569. example: tvn
  570. channelName:
  571. type: string
  572. example: TVN Noticias
  573. thumbnailUrl:
  574. type: string
  575. player:
  576. type: object
  577. properties:
  578. type:
  579. type: string
  580. example: ooyala
  581. enum: ["ooyala", "audio", "youtube"]
  582. value:
  583. type: string
  584. example: 2MzFWVhNzkR0MGkT1bhFyOujhjnz
  585. description: "Según el campo type: ooyala=embedCode, youtube=VideoIdYoutube, audio=urlAudio"
  586. ads:
  587. type: array
  588. description: Sólo llegará este parámetro cuando el tipo sea ooyala
  589. items:
  590. $ref: '#/components/schemas/Ad'
  591. gridUrl:
  592. type: string
  593. example: https://www.tvn-2.com/tvn/app/2.1/services/grid.json?channelId=tvn
  594.  
  595. backgroundImageUrl:
  596. type: string
  597. description: Background image (only radio)
  598. example: http://www.bitban.com/img/assets/logo-dark.png
  599.  
  600. Grid:
  601. type: array
  602. items:
  603. type: object
  604. properties:
  605. name:
  606. type: string
  607. example: Hoy
  608. description: Nombre de la agrupación de los programas (antes de ayer, ayer, hoy o mañana).
  609. active:
  610. type: boolean
  611. description: Indica que pestaña debe estar seleccionada por defecto
  612. default: true
  613. programs:
  614. type: array
  615. items:
  616. $ref: '#/components/schemas/Program'
  617.  
  618. EleccionesDashboard:
  619. type: object
  620. properties:
  621. data:
  622. type: array
  623. items:
  624. type: object
  625. properties:
  626. active:
  627. type: boolean
  628. icon:
  629. type: string
  630. example: "14101"
  631. name:
  632. type: string
  633. example: "Home"
  634. layoutDatas:
  635. type: object
  636. properties:
  637. topicId:
  638. type: integer
  639. example: 348
  640. description: Este campo aparece cuando layoutId = TVN_LAYOUT_LIST
  641. contentId:
  642. type: string
  643. example: "TVNNWS20180828_0001"
  644. description: Este campo aparece cuando layoutId = TVN_LAYOUT_DETAIL
  645. layoutId:
  646. type: string
  647. example: "TVN_LAYOUT_LIST | TVN_LAYOUT_DETAIL"
  648. description: Puede ser TVN_LAYOUT_LIST o TVN_LAYOUT_DETAIL
  649. navigationId:
  650. type: integer
  651. example: 5000216
  652. EleccionesWidget:
  653. type: object
  654. properties:
  655. data:
  656. type: array
  657. items:
  658. type: object
  659. properties:
  660. layoutDatas:
  661. type: object
  662. properties:
  663. contentId:
  664. type: string
  665. example: <div><p>En el caso de ser un html libre</p></div>
  666. description: Si layoutId es TVN_LAYOUT_LIST
  667. htmlServiceUrl:
  668. type: string
  669. example: https://www.tvn-2.com/tvn/app/3/services/widget.json?sectionId=1
  670. description: Recibirá de un servicio el HTML del widget en caso de ser TVN_LAYOUT_HTML
  671. layoutId:
  672. type: string
  673. example: "TVN_LAYOUT_LIST"
  674. description: Podrá ser TVN_LAYOUT_LIST o TVN_LAYOUT_HTML
  675. EleccionesCeldaPromocion:
  676. type: object
  677. properties:
  678. data:
  679. type: object
  680. properties:
  681. active:
  682. type: boolean
  683. description: Controlar que aparezca en la home (según se crea conveniente desde redacción).
  684. default: true
  685. text:
  686. type: string
  687. example: "Noticias"
  688. description: Texto que aparecerá sobre la imagen
  689. backgroundImageUrl:
  690. type: string
  691. example: http://www.bitban.com/img/assets/logo-dark.png
  692. promotionUrl:
  693. type: string
  694. example: "TVNNWS20180828_0001"
  695. description: contentId al que enlazará la celda
  696.  
  697. Program:
  698. type: object
  699. properties:
  700. startTime:
  701. type: integer
  702. description: Fecha de inicio del programa.
  703. example: 1513314000
  704. endTime:
  705. type: integer
  706. description: Fecha de finalización del programa.
  707. example: 1513317600
  708. title:
  709. type: string
  710. description: Título del programa
  711. example: Novela Bajo El Mismo Cielo
  712. live:
  713. type: boolean
  714. description: Si el programa será emitido en directo.
  715. embedCode:
  716. type: string
  717. description: "Identificador del vídeo del programa en Ooyala. No aparecerá en caso de que: 1) el programa no sea emitido en vivo. y 2) el player no sea de Ooyala."
  718. example: 2MzFWVhNzkR0MGkT1bhFyOujhjnz
  719. ads:
  720. type: array
  721. description: Información relativa a la publicidad a mostrar para ese segmento de vídeo
  722. items:
  723. $ref: '#/components/schemas/Ad'
  724.  
  725. Ad:
  726. type: object
  727. properties:
  728. videoplaza-ads-manager:
  729. type: object
  730. properties:
  731. pulse_category:
  732. type: string
  733. description: Categoría de pulse definida por tvn. Si no existe el parámetro pulse_category, no enviar el objeto ads
  734. example: en_vivo_tvn
  735. pulse_linear_cuepoints:
  736. type: string
  737. description: Posiciones de publicidad, en caso de que haya varias, se separa por comas. Si no está configurado el parámetro, no enviar
  738. example: 50,70
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement