iadea-rest
v1.6.6
Published
A JavaScript library that provides REST API interface for Iadea media players and signboards.
Readme
README
A JavaScript library that provides REST API interface for Iadea media players and signboards. This library uses Q promises.
Installation
npm install iadea-restUsage examples
To use Iadea REST API library
Require 'iadea-reset' in your file:
var iadea = require('iadea-rest');Connect to Iadea device and perform API calls:
iadea.connect(host).
then(iadea.getModelInfo).
then(console.log).
then(iadea.getFirmwareInfo).
then(console.log).
catch(console.log);To play a file:
iadea.connect(host).
then(function(){return iadea.playFile('/user-data/test.smil')}).
then(console.log).
catch(console.log);It is possible to combine findFileByName adn playFile:
iadea.connect(host).
then(function () {return iadea.findFileByName('slideshow.smil')}).
then(iadea.playFile).
then(console.log).
catch(console.log); Contribution
If you would like to contribute, please fork the repo and send in a pull request.
License
(The MIT License) Copyright (c) 2017 Alexander Pivovarov [email protected]
