shippable

1.0.1 • Public • Published

Shippable Api

Build Status NPM Version NPM Downloads

Installation

$ npm install shippable

Features

  • Wraps each shippable api

Documentation

accounts

Information associated with accounts.

dependencies(accountId, callback)

Gets all account dependencies including subscriptions, enabled projects, credit cards and account integrations.

Arguments

  • accountId - Id of account to get dependencies for
  • callback(err, dependencies) - Callback with error or dependencies

get(accountId, callback)

Gets details about an account

Arguments

  • accountId - Id of account to retrieve details for
  • callback(err, account) - Callback with error or account details

list(callback)

Gets a list of the accounts the token can access.

Arguments

  • callback(err, accounts) - Callback with error or data

runStatus(accountId, callback)

Gets status of all runs for all enabled projects across all subscriptions

Arguments

  • accountId - Id of account to get status for
  • callback(err, status) - Callback with error or status

jobs

delete(jobId, callback)

Delete a job

  • jobId - Id of job to retrieve details for
  • callback(err, job) - Callback with error or details of deleted job.

downloadConsoleLog(jobId, callback)

Download the console log

Arguments

  • jobId - Id of job to retrieve details for
  • callback(err, log) - Callback with error or console log.

get(jobId, callback)

Get details about a job

Arguments

  • jobId - Id of job to retrieve details for
  • callback(err, job) - Callback with error or job details.

getCoverageReport(jobId, callback)

Get the test coverage report

Arguments

  • jobId - Id of job to retrieve details for
  • callback(err, report) - Callback with error or report.

getTestReport(jobId, callback)

Get the test report

Arguments

  • jobId - Id of job to retrieve details for
  • callback(err, report) - Callback with error or report.

list(query, callback)

List jobs

Arguments

  • query - Query object for filtering jobs. See shippable docs for options.
  • callback(err, jobs) - Callback with error or array of jobs.

projects

builds.disable(projectId, callback)

Disables a project so that it doesn't build

Arguments

  • projectId - Id of project to disable
  • callback(err) - Callback with error

builds.enable(projectId, callback)

Enables a project to build

Arguments

  • projectId - Id of project to enable
  • callback(err) - Callback with error

builds.new(projectId, callback)

Triggers a build for the project

  • projectId - Id of project to trigger a build on
  • callback(err) - Callback with error

get(projectId, callback)

Get details about a project

Arguments

  • projectId - Id of project to get details about.
  • callback(err, project) - Callback with error or project details. Project is null if not found.

getBranchRunStatus(projectId, callback)

Get details about the branch runs of a project

Arguments

  • projectId - Id of project to get branch runs for.
  • callback(err, project) - Callback with error or branch runs.

getByFullName(fullName, callback)

Gets details about a project using the full name of the project to look it up. Checks local cache first and if not found makes a call to projects() to get a full list of projects and caches it.

Arguments

  • fullName - Full name of project in github format i.e. chriskinsman/shippable. This is a case sensitive match.
  • callback(err, project) - Callback with error or project details. Project is null if not found.

list(query, callback)

List all projects associated with token. This may be across multiple organizations.

Arguments

  • query - Query parameters to filter projects. See shippable api docs for details.
  • callback(err, projects) - Callback with error or array of projects.

runs

cancel(runId, callback)

Cancels a run

Arguments

  • runId - Id of run to cancel
  • callback(err, run) - Callback with error or results from cancel.

delete(runId, callback)

Deletes a run

Arguments

  • runId - Id of run to delete
  • callback(err, run) - Callback with error or results from delete.

get(runId, callback)

Get details about a run.

Arguments

  • runId - Id of run to retrieve details for
  • callback(err, run) - Callback with error or run details.

list(query, callback)

List all runs associated with token.

Arguments

  • query - Query object for filtering runs. See shippable docs for options.
  • callback(err, runs) - Callback with error or array of runs.

subscriptions

delete(subscriptionId, callback)

Deletes a subscription

Arguments

  • subscriptionId - Id of subscription to delete
  • callback(err, subscription) - Callback with error or subscription that was deleted.

get(subscriptionId, callback)

Get details about a subscription.

Arguments

  • subscriptionId - Id of subscription to get details about.
  • callback(err, subscription) - Callback with error or subscription details. Subscription is null if not found.

getActiveMinionCount(subscriptionId, callback)

Gets the active minion count associated with subscription

Arguments

  • subscriptionId - Id of subscription to get active minion count for.
  • callback(err, count) - Callback with error or count.

getByOrgName(orgName, callback)

Gets details about a subscription using the organization name of the project to look it up. Checks local cache first and if not found makes a call to list() to get a full list of subscriptions and caches it.

Arguments

  • orgName - Organization name of project from github. This is a case sensitive match.
  • callback(err, subscription) - Callback with error or subscription details. Subscription is null if not found.

list(query, callback)

List all subscriptions associated with token. This may be across multiple organizations.

Arguments

  • query - Filter parameters. See shippable documentation for details
  • callback(err, subscriptions) - Callback with error or array of subscriptions.

People

The author is Chris Kinsman

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i shippable

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

26.7 kB

Total Files

12

Last publish

Collaborators

  • chriskinsman