Simple Javascript wrapper for Semaphore CI's API
$ npm install node-semaphoreci --save
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);
});
$ npm install
$ npm test