codeship-node-v2

0.0.6 • Public • Published

codeship-node-v2

A newer version of codeship-node for use with version 2 of the Codeship API

Usage

import Codeship from 'codeship-node-v2'

const codeship = new Codeship({
  orgUuid: 'organisation-uuid',
  orgName: 'organisation-name',
  username: 'jane@example.com',
  password: 'codeshipPassword'
});

Only one of the organisation details is required, the UUID will be found if you supply the name.

Like the original codeship-node module, each method is nested under its resource name, this time it's implemented with native promises:

codeship.projects.list()
  .then((projects) => console.log('Projects!', projects))
  .catch((error) => console.error('Error!', error))

You could also use it in an async function using await:

try {
  const project = await codeship.projects.list()
  console.log('Projects!', projects)
} catch (error) {
  console.error('Error!', error)
}

The whole API is not yet implemented. The current list of functionality is:

builds.list(projectUuid)
builds.get(buildUuid, projectUuid)
builds.restart(buildUuid, projectUuid)
projects.get(projectUuid)
projects.list()

TODO:

  • Write tests
  • Provide more coverage of the API

Readme

Keywords

none

Package Sidebar

Install

npm i codeship-node-v2

Weekly Downloads

3

Version

0.0.6

License

ISC

Unpacked Size

6.71 kB

Total Files

3

Last publish

Collaborators

  • trolleymusic