Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- openapi: 3.0.0
- info:
- title: API TVN APP
- description: Definición de los servicios necesarios para la aplicación de TVN
- version: 1.0.0
- contact:
- name: Álvaro Galindo
- email: agalindo@bitban.com
- servers:
- - url: https://www.tvn-2.com/tvn/app/{version}/services
- description: Servidor para peticiones contra producción
- variables:
- version:
- enum:
- - "1.0"
- - "1.1"
- - "2.0"
- - "2.1"
- - "3.0"
- default: "1.0"
- - url: https://www.tvn-2.com.prebb3.bitban.com/tvn/app/{version}/services
- description: Servidor para peticiones contra preproducción
- variables:
- version:
- enum:
- - "1.0"
- - "1.1"
- - "2.0"
- - "2.1"
- - "3.0"
- default: "1.0"
- paths:
- # Servicios comunes
- /facebook_login.json:
- post:
- summary: Login con facebook
- description: Permite hacer login al usuario a través de Facebook
- tags:
- - facebook-login
- parameters: []
- servers:
- - url: https://www.tvn-2.com/tvn/facebook_login.json
- - url: https://www.tvn-2.com.prebb3.bitban.com/tvn/facebook_login.json
- requestBody:
- content:
- multipart/form-data:
- schema: # Request payload
- type: object
- properties: # Request parts
- facebookAccessToken: # Part 1 (string value)
- description: Access token provides by Facebook
- type: string
- example: "EAAOZC94FV3z4BAHHAjJ5YroSRnZBZA2MIMNaIedE0NCSPPRoImjd5V9EGilATOJSslt6SUBuyIdG2cE0nhVtFXu3bdpeTI6pi5iykRZChHEN5TS0BvdO0CquwOVa3d6VZCTTiYKa6TSFvrkSEL1GIAuVgTQmbSwIQjbeQWovbaZAyI4cHmy6AZBa9pUZAVWIXDfngoRZA1tY9EXZAsTZAVZCrZAzD8ZBRXpxzlta2qrZCYVxhiPOgZDZD"
- responses:
- 200:
- description: Login performs successfully
- headers:
- bb3_session_id:
- schema:
- type: string
- description: Session cookie
- a00bcafe07a2851fd5ea7f9a41e4dab0:
- schema:
- type: integer
- description: User id cookie.
- /app.json:
- get:
- description: Get app info to configure the application.
- tags:
- - general
- parameters:
- - $ref: '#/components/parameters/appParam'
- responses:
- 200:
- description: Ok
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/App'
- /content/data/content.json:
- get:
- description: Datos de un contenido
- tags:
- - contenido
- parameters:
- - $ref: '#/components/parameters/appParam'
- - $ref: '#/components/parameters/contentParam'
- responses:
- 200:
- description: Ok
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- $ref: '#/components/schemas/itemComponent'
- # Servicios de rediseño APP
- /top/{contentType}.json:
- get:
- description: Listado de contenidos más vistos filtrando por tipos
- tags:
- - rediseño
- parameters:
- - in: path
- description: Tipo de contenido para filtrar la búsqueda
- name: contentType
- schema:
- type: string
- enum:
- - "NWS"
- - "VID"
- required: true
- - $ref: '#/components/parameters/appParam'
- - $ref: '#/components/parameters/limitParam'
- responses:
- 200:
- description: Ok
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/itemComponent'
- /programs.json:
- get:
- description: Listado de programas
- tags:
- - rediseño
- parameters:
- - $ref: '#/components/parameters/appParam'
- responses:
- 200:
- description: Ok
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- results:
- type: array
- items:
- type: object
- properties:
- entityType:
- type: string
- example: link
- entityValue:
- type: string
- example: http://www.tvn-2.com/tag/gente_que_inspira/videos
- title:
- type: string
- example: Title
- subtitle:
- type: string
- example: Subtitle
- imageUrl:
- type: string
- example: ""
- /videos.json:
- get:
- description: Listado de últimos vídeos publicados
- tags:
- - rediseño
- parameters:
- - $ref: '#/components/parameters/appParam'
- - $ref: '#/components/parameters/limitParam'
- - $ref: '#/components/parameters/pageParam'
- responses:
- 200:
- description: Ok
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/itemComponent'
- # Servicios del catchup
- /channels.json:
- get:
- summary: Lista de canales disponibles
- description: Devuelve la lista de canales en vivo disponibles, incluyendo su identificador, nombre, icono y URL para obtener la parrilla del canal.
- tags:
- - catchup
- parameters: []
- responses:
- 200:
- description: Ok
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Channel'
- /grid.json:
- get:
- summary: Parrilla de programación de un canal
- description: Devuelve la parrilla de programación del canal indicado.
- tags:
- - catchup
- parameters:
- - name: channelId
- description: Identificador del canal
- schema:
- type: string
- in: query
- responses:
- 200:
- description: Ok
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Grid'
- 404:
- description: El identificador del canal no existe
- # Servicios del microsite elecciones
- /elecciones/dashboard.json:
- get:
- summary: Listado de secciones y contenido destacado
- description: Servicio que devuelve una lista de secciones que se muestran en ese dashboard y un contenido destacado
- tags:
- - microsite-elecciones
- parameters: []
- responses:
- 200:
- description: Ok
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/EleccionesDashboard'
- /elecciones/widget.json:
- get:
- summary: Esto es una página HTML para devolver directamente un HTML que se edita en la portada
- description: Por lo tanto el servicio deberá recibir un identificador de sección y devolver HTML.
- tags:
- - microsite-elecciones
- parameters:
- - name: sectionId
- description: Identificador de sección
- schema:
- type: string
- in: query
- responses:
- 200:
- description: Ok
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/EleccionesWidget'
- 404:
- description: El identificador de seccion no existe
- /elecciones/celda_promocion.json:
- get:
- summary: Nuevo tipo de celda que se crea con el objetivo de promocionar uno de los productos de TVN.
- 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.
- tags:
- - microsite-elecciones
- parameters: []
- responses:
- 200:
- description: Ok
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/EleccionesCeldaPromocion'
- components:
- parameters:
- appParam:
- name: app
- description: App configuration for the service
- in: query
- schema:
- type: integer
- enum:
- - "1000" # tvn2
- - "1001" # Gran hermano
- - "1002" # Esto es guerra
- default: "1000"
- limitParam:
- name: limit
- description: Límite de elementos a mostrar
- in: query
- schema:
- type: integer
- default: 5
- pageParam:
- name: page
- description: Número de página
- in: query
- schema:
- type: integer
- default: 1
- contentParam:
- name: contentId
- description: Identificador de contenido
- in: query
- schema:
- type: string
- pattern: '([A-Z0-9]{3})([A-Z0-9]{3})(\d{4})(\d{2})(\d{2})_(\d{4})'
- schemas:
- itemComponent:
- type: object
- properties:
- id:
- type: string
- example: TVNNWS20170415_0050
- ico:
- type: string
- example: PLAY
- sectionId:
- type: integer
- example: 1000100
- sectionName:
- type: string
- example: Nacionales
- title:
- type: string
- example: Jugador de la selección Amílcar Henríquez muere tras balacera en Colón
- publishedDate:
- type: integer
- example: 1492298985
- signatureAuthorName:
- type: string
- example: Redacción de TVN Noticias
- html:
- type: string
- example: https://www.tvn-2.com.prebb3.bitban.com/tvn/app/2/services/content/webview/content.html?contentId=TVNNWS20170415_0050
- shareUrl:
- type: string
- example: https://www.tvn-2.com.prebb3.bitban.com/_11a3ac544
- absoluteURL:
- type: string
- example: https://www.tvn-2.com.prebb3.bitban.com/nacionales/Amilcar-Henriquez-herido-arma-fuego-Seleccion-Nacional-futbol_0_4735026500.html
- disqusId:
- type: string
- example: tvnnoticias
- imageUrls:
- type: array
- items:
- $ref: '#/components/schemas/imageComponent'
- videoInfo:
- $ref: '#/components/schemas/videoComponent'
- imageComponent:
- type: object
- properties:
- url:
- type: string
- example: https://www.tvn-2.com.prebb3.bitban.com/videos/noticias/Jugador-Amilcar-Henriquez-balacera-Colon_9695809.jpg
- width:
- type: integer
- example: 192
- height:
- type: integer
- example: 108
- videoComponent:
- type: object
- properties:
- ooyalaId:
- type: string
- example: 45M3A0YzE6zl488L4RqJjblJ8tGYnJ9b
- ads:
- type: array
- items:
- $ref: '#/components/schemas/Ad'
- App:
- type: object
- required:
- - ads
- - data
- properties:
- ads:
- type: object
- required:
- - android
- - ios
- properties:
- android:
- $ref: '#/components/schemas/AppLayoutDatas'
- ios:
- $ref: '#/components/schemas/AppLayoutDatas'
- data:
- type: object
- required:
- - navigations
- - status
- properties:
- navigations:
- type: object
- required:
- - home
- - menu
- properties:
- home:
- type: array
- items:
- $ref: '#/components/schemas/AppNavigation'
- menu:
- type: array
- items:
- $ref: '#/components/schemas/AppNavigation'
- status:
- type: object
- required:
- - android
- - ios
- properties:
- android:
- $ref: '#/components/schemas/AppStatus'
- ios:
- $ref: '#/components/schemas/AppStatus'
- AppLayoutDatas:
- type: object
- properties:
- TVN_LAYOUT_HOME:
- type: array
- items:
- $ref: '#/components/schemas/AppAds'
- TVN_LAYOUT_LIST:
- type: array
- items:
- $ref: '#/components/schemas/AppAds'
- TVN_LAYOUT_PLAYER:
- type: array
- items:
- $ref: '#/components/schemas/AppAds'
- TVN_LAYOUT_LOTTERIES:
- type: array
- items:
- $ref: '#/components/schemas/AppAds'
- TVN_LAYOUT_TVGRID:
- type: array
- items:
- $ref: '#/components/schemas/AppAds'
- TVN_LAYOUT_FEEDEXPLORER:
- type: array
- items:
- $ref: '#/components/schemas/AppAds'
- TVN_LAYOUT_FEEDSELECTION:
- type: array
- items:
- $ref: '#/components/schemas/AppAds'
- TVN_LAYOUT_READLATER:
- type: array
- items:
- $ref: '#/components/schemas/AppAds'
- TVN_LAYOUT_DETAIL:
- type: array
- items:
- $ref: '#/components/schemas/AppAds'
- AppAds:
- type: object
- required:
- - adUnitId
- - type
- properties:
- adUnitId:
- type: string
- example: /2259226/app_noticias_home_footer
- type:
- type: string
- example: banner_bottom
- offset:
- type: string
- example: 3
- repeat:
- type: string
- example: 5
- AppStatus:
- type: object
- properties:
- block:
- type: object
- properties:
- enabled:
- type: string
- example: "0"
- message:
- type: string
- example: "Mensaje de bloqueo"
- url:
- type: string
- example: "http://www.google.es"
- version:
- type: object
- properties:
- enabled:
- type: string
- example: "1"
- message:
- type: string
- example: "Hola, hemos realizado mejoras a nuestra aplicación para que disfrutes mejor de todo nuestro contenido. Por favor actualiza tu APP"
- url:
- type: string
- example: "https://play.google.com/store/apps/details?id=air.com.tvn.app.mobile.TVNNoticias"
- version:
- type: string
- example: "20161202"
- AppNavigation:
- type: object
- required:
- - active
- - icon
- - layoutId
- - name
- - navigationId
- properties:
- active:
- type: boolean
- default: true
- icon:
- type: string
- example: "tabbar-home"
- layoutDatas:
- type: string
- example: "{\"topicId\":\"1000000\"}"
- layoutId:
- type: string
- example: "TVN_LAYOUT_LIST"
- name:
- type: string
- example: "Home"
- navigationId:
- type: integer
- example: 5000100
- Channel:
- type: object
- properties:
- channelId:
- type: string
- example: tvn
- channelName:
- type: string
- example: TVN Noticias
- thumbnailUrl:
- type: string
- player:
- type: object
- properties:
- type:
- type: string
- example: ooyala
- enum: ["ooyala", "audio", "youtube"]
- value:
- type: string
- example: 2MzFWVhNzkR0MGkT1bhFyOujhjnz
- description: "Según el campo type: ooyala=embedCode, youtube=VideoIdYoutube, audio=urlAudio"
- ads:
- type: array
- description: Sólo llegará este parámetro cuando el tipo sea ooyala
- items:
- $ref: '#/components/schemas/Ad'
- gridUrl:
- type: string
- example: https://www.tvn-2.com/tvn/app/2.1/services/grid.json?channelId=tvn
- backgroundImageUrl:
- type: string
- description: Background image (only radio)
- example: http://www.bitban.com/img/assets/logo-dark.png
- Grid:
- type: array
- items:
- type: object
- properties:
- name:
- type: string
- example: Hoy
- description: Nombre de la agrupación de los programas (antes de ayer, ayer, hoy o mañana).
- active:
- type: boolean
- description: Indica que pestaña debe estar seleccionada por defecto
- default: true
- programs:
- type: array
- items:
- $ref: '#/components/schemas/Program'
- EleccionesDashboard:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- active:
- type: boolean
- icon:
- type: string
- example: "14101"
- name:
- type: string
- example: "Home"
- layoutDatas:
- type: object
- properties:
- topicId:
- type: integer
- example: 348
- description: Este campo aparece cuando layoutId = TVN_LAYOUT_LIST
- contentId:
- type: string
- example: "TVNNWS20180828_0001"
- description: Este campo aparece cuando layoutId = TVN_LAYOUT_DETAIL
- layoutId:
- type: string
- example: "TVN_LAYOUT_LIST | TVN_LAYOUT_DETAIL"
- description: Puede ser TVN_LAYOUT_LIST o TVN_LAYOUT_DETAIL
- navigationId:
- type: integer
- example: 5000216
- EleccionesWidget:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- layoutDatas:
- type: object
- properties:
- contentId:
- type: string
- example: <div><p>En el caso de ser un html libre</p></div>
- description: Si layoutId es TVN_LAYOUT_LIST
- htmlServiceUrl:
- type: string
- example: https://www.tvn-2.com/tvn/app/3/services/widget.json?sectionId=1
- description: Recibirá de un servicio el HTML del widget en caso de ser TVN_LAYOUT_HTML
- layoutId:
- type: string
- example: "TVN_LAYOUT_LIST"
- description: Podrá ser TVN_LAYOUT_LIST o TVN_LAYOUT_HTML
- EleccionesCeldaPromocion:
- type: object
- properties:
- data:
- type: object
- properties:
- active:
- type: boolean
- description: Controlar que aparezca en la home (según se crea conveniente desde redacción).
- default: true
- text:
- type: string
- example: "Noticias"
- description: Texto que aparecerá sobre la imagen
- backgroundImageUrl:
- type: string
- example: http://www.bitban.com/img/assets/logo-dark.png
- promotionUrl:
- type: string
- example: "TVNNWS20180828_0001"
- description: contentId al que enlazará la celda
- Program:
- type: object
- properties:
- startTime:
- type: integer
- description: Fecha de inicio del programa.
- example: 1513314000
- endTime:
- type: integer
- description: Fecha de finalización del programa.
- example: 1513317600
- title:
- type: string
- description: Título del programa
- example: Novela Bajo El Mismo Cielo
- live:
- type: boolean
- description: Si el programa será emitido en directo.
- embedCode:
- type: string
- 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."
- example: 2MzFWVhNzkR0MGkT1bhFyOujhjnz
- ads:
- type: array
- description: Información relativa a la publicidad a mostrar para ese segmento de vídeo
- items:
- $ref: '#/components/schemas/Ad'
- Ad:
- type: object
- properties:
- videoplaza-ads-manager:
- type: object
- properties:
- pulse_category:
- type: string
- description: Categoría de pulse definida por tvn. Si no existe el parámetro pulse_category, no enviar el objeto ads
- example: en_vivo_tvn
- pulse_linear_cuepoints:
- type: string
- description: Posiciones de publicidad, en caso de que haya varias, se separa por comas. Si no está configurado el parámetro, no enviar
- example: 50,70
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement