node-semaphoreci

1.0.3 • Public • Published

node-semaphoreci

Build Status

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

Dependencies (1)

Dev Dependencies (4)

Package Sidebar

Install

npm i node-semaphoreci

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • benzhang