codeship
Version:
An API wrapper of Codeship
57 lines (39 loc) • 1.41 kB
Markdown
[](https://badge.fury.io/js/codeship)
[](https://travis-ci.org/John-Lin/codeship-api)
An better API wrapper for [Codeship](https://codeship.com/).
[](https://codeship.com/documentation/integrations/api/)
With [npm](https://www.npmjs.com/) do:
```sh
npm install codeship
```
After [sign up Codeship](https://codeship.com/registrations/new). You can get your API key on [your account page](https://codeship.com/user/edit).
```javascript
'use strict';
let Codeship = require('codeship');
let codeship = new Codeship('APIKEY');
codeship.listProjects((err, results) => {
if (err) throw err;
console.log(results);
});
codeship.getProject('111139', (err, result) => {
if (err) throw err;
console.log(result);
});
codeship.getProjectBuildData('111139', (err, result) => {
if (err) throw err;
console.log(result);
});
```
Return an array include all projects on codeship.
Return a single project `projectId` is required.
Return build data in a single project `projectId` is required.
MIT © [Che-Wei Lin](https://github.com/John-Lin)