@soba-project/widgets-api-client
v0.2.0
Published
Widgets server's API client
Downloads
9
Readme
Widgets server WEB-API client helper for Node.js
Basic usage
var widgetsApi = require('widgets-api-client')
, apiClient = widgetsApi.createClient('chat')
, channelId = 10 // channelId of widgets (\`channels\`.\`id\` column of Widgets server DB)
, authnToken = 'testAuthnToken' // See https://tstb.backlog.jp/wiki/LIVE/AuthenticationSpecification
, signature = 'testSignature' // See above
, connections = 10;
apiClient.autheticate(channelId, authnToken, signature);
apiClient.updateConnectionsCount(channelId, connections);
Development
Requirements
- Node.js (http://nodejs.org/)
Tests
Install the dependencies for the tests:
% npm install -d
Run the tests:
% npm test