node-semaphoreci
v1.0.3
Published
A Javascript wrapper for the Semaphore CI API
Downloads
5
Readme
node-semaphoreci
Simple Javascript wrapper for Semaphore CI's API
Installation
$ npm install node-semaphoreci --save
Examples
ES6:
import SemaphoreCI from 'node-semaphoreci'
const api = new SemaphoreCI({
api_url: 'http://semaphoreci.com/api/v1',
project_hash: 'some_hash',
auth_token: 'some_token'
})
api.getBranches().then(response => {
const branches = response.data;
// ...
}).catch(err => {
console.log(err);
});
ES5:
var SemaphoreCI = require('node-semaphoreci').default;
var api = new SemaphoreCI({
api_url: 'http://semaphoreci.com/api/v1',
project_hash: 'some_hash',
auth_token: 'some_token'
})
api.getBranches().then(function (response) {
var branches = response.data;
// ...
}).catch(function (err) {
console.log(err);
});
Useful Links
Testing
$ npm install
$ npm test