zapp-pipes-provider-televisa
v1.0.1
Published
Televisas provider project for zapp-pipes
Downloads
5
Maintainers
Readme
zapp-pipes-provider-televisa - version 1.1.1
A project for development of data provider of Televisa to the APPLICASTER's CMS ZAPP PIPES.
Televisa Provider API
The Televisa Data Provider is a middleware that interacts between the NPM's packages origin and UI Builder who's constructs the application.
###ZAPP PIPES documentation:
You can check the documentation of Applicaster Zapp Pipes here:
http://zapp-tech-book.herokuapp.com/
###How to install the Zapp Pipes:
If you like to see the How to install the Zapp Pipes documentation follow the next link:
http://gitlab-developer.esmas.com.mx/applicaster/zapp/blob/develop/README_INSTALL_ZAPP_PIPES.md
###Access and Login to NPM web site
To access the NPM web site:
https://www.npmjs.com/
It's necessary to make login, to get that info access to README_INSTALL_ZAPP_PIPES.md.
###How to use it:
Run the server and you can programm and view the changes and test the provider; this test could be watched at the localhost.
###Parameters & variables explanation:
At the Televisa Provider API could be used different parameters and variables in the web browser directions bar.
The parameters that can use are:
- type=<[String]>: It is an string of
request_type
handled by the provider. It is an obligatory string at the provider, the parameters value could betelevisa_collection
ortelevisa_programs
. The parametertelevisa_collection
is used for notes, galleries and video entries, while theprogram
parameter is used for the sliders videos at the Video LIVE carousel of Televisas Sports APP. If a request is made to an unregisteredrequest_type
, the zapp-pipes bundle will throw an error. - url=<[String]>: By the use of the Televisas Provider API it is necessary to get the results. The values that url receives are the URL of XML / JSON of the sections of Deportes of Televisa.
Where:
- Type: type=televisa_collection || type=televisa_programs
- URL: url=http://static-feeds.esmas.com/awsfeeds/testdeportes/atom_mix_futbol.xml || http://static-feeds.esmas.com/awsfeeds/testdeportes/epg_654.js
The variables that can use are:
- itemsNumber=<[int]>: This variable is used to displays the items number to data provider's output.
- startFrom=<[int]>: This variable is used to displays from which element number will be shown in the data provider.
This variables should be puts at the url parameter, because the provider use the encode to base64 to works, e.g. :
http://localhost:8080/televisadigital/fetchData?type=televisa_collection&url=http://static-feeds.esmas.com/awsfeeds/testdeportes/test_futbol.xml?itemsNumber=3&startFrom=30
An important element in the provider's url is the provider's name, this was named in the index.js, at this route: ../src/index.js:
- Provider name: televisadigital
###Examples of a Televisas provider API implementation:
Collection link:
http://dev-zapp.televisatim.com/televisadigital/fetchData?type=televisa_collection&url=http://static-feeds.esmas.com/awsfeeds/testdeportes/atom_mix_futbol.xml
Program link:
http://dev-zapp.televisatim.com/televisadigital/fetchData?type=televisa_programs&url=http://static-feeds.esmas.com/awsfeeds/testdeportes/epg_645.js
###Deportes APP section's URLs:
The next URLs cointains the info of each section of Televisa Deportes APP, the origin of each one are exported by WP. Each link feed contains the real APP's information.
The sections are:
- Carrusel App: http://static-feeds.esmas.com/awsfeeds/sports/video/applicaster/home_videos.xml http://static-feeds.esmas.com/awsfeeds/testdeportes/epg_645.js
** The above section could be a mixed section (LIVE videos and VOD videos), this section could use both types files, XML and JSON. Meanwhile the Televisa's provider only can use the JSON type. **
Sección Home: http://static-feeds.esmas.com/awsfeeds/sports/news/atom_mix_home.xml
Sección Futbol: http://static-feeds.esmas.com/awsfeeds/sports/news/atom_mix_futbol.xml
Sección Futbol Americano: http://static-feeds.esmas.com/awsfeeds/sports/news/atom_mix_nfl.xml
Sección Beisbol: http://static-feeds.esmas.com/awsfeeds/sports/news/atom_mix_beisbol.xml
Sección Box: http://static-feeds.esmas.com/awsfeeds/sports/news/atom_mix_box.xml
Sección Basquetbol: http://static-feeds.esmas.com/awsfeeds/sports/news/atom_mix_nba.xml
Sección UFC: http://static-feeds.esmas.com/awsfeeds/sports/news/atom_mix_ufc.xml
Sección Otros Deportes: http://static-feeds.esmas.com/awsfeeds/sports/news/atom_mix_sportmix.xml
Sección Video Galerías: http://static-feeds.esmas.com/awsfeeds/sports/news/atom_mix_videogaleria.xml
The above links may be used to change the Televisa Provider link as follows:
** Domain + Provider's Name (televisadigital) + fetchData?type= + (televisa_collection / televisa_programs) + Deportes Application's section's url + ( ?itemsNumber=<[int]>&startFrom=<[int]>) **
For example:
http://dev-zapp.televisatim.com/televisadigital/fetchData?type=televisa_collection&url=http://static-feeds.esmas.com/awsfeeds/testdeportes/atom_mix_futbol.xml?itemsNumber=3&startFrom=2
###Uploading the npm package:
To upload the Televisa's provider npm package it's necessary follow the next steps:
- Update the parameter version in the package.json file.
- In the bash access to develop package folder execute next the command, to generate the package build:
npm run build
- Run the publish command to npm's servers:
npm publish
- Finally verify the correct changes at:
https://www.npmjs.com/package/@applicaster/zapp-pipes-provider-televisa
###Install npm Televisa's Provider package:
To install the npm package only it's necessary execute in the bash the command:
npm install @applicaster/zapp-pipes-provider-televisa
This package appears at the node_modules folder with the Televisa's Provider data.
###Modification plugin-manifest.json:
The only necessaries modification is the dependency_version, the dependency_version is the version used by the Televisa's Data Provider for the different apps used by this.
For example:
Change at the json the dependency_version number:
"dependency_version": "1.0.21",
###Uploading plugin-manifest.json:
To uploading the plugin-manifest.json first its necessary install the Applicaster's Zappifest Tool. The documentation could be find at the next link:
zapp-tech-book.herokuapp.com/zappifest/zappifest.html
To install the Zappifest Tool use the next commands at the bash:
brew tap applicaster/tap brew install zappifest
After the installation its necessary Upgrade the tool, to do this use the next command:
brew upgrade zappifest
Finally take the file plugin-manifest.json from the lasestrellas-webapp repository, access and edit it and to the file containing folder at the bash, and throw the next command:
zappifest publish --plugin-id 577 --manifest ./plugin-manifest.json --access-token 86fed24233fef871cdd4fb3b9d3891ceee00e40eb9e834bbeeb7a0e51e72442d
Its important to know that the last part of command its the access token from Applicaster's.