0.0.6 • Published 6 years ago

codeship-node-v2 v0.0.6

Weekly downloads
8
License
ISC
Repository
github
Last release
6 years ago

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
0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago