1.0.1 • Published 7 years ago

zapp-pipes-provider-televisa v1.0.1

Weekly downloads
86
License
UNLICENSED
Repository
-
Last release
7 years ago

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 be televisa_collection or televisa_programs. The parameter televisa_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 unregistered request_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:

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:

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.

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.