This package has been deprecated

Author message:

Deprecated in favor of @shortcut/client

clubhouse-lib
TypeScript icon, indicating that this package has built-in type declarations

0.13.0 • Public • Published

Clubhouse logo

Clubhouse-lib

A library for interacting with the Shortcut REST API

Current npm package version. Current CircleCI build status. PRs welcome! Follow @useshortcut


Getting Started

Installation

You can install clubhouse-lib with NPM or Yarn.

npm install --save clubhouse-lib

or

yarn add clubhouse-lib

How to Get an API Token

The Shortcut API uses token-based authentication, you will need one to use this library.

To generate an API token, go to https://app.shortcut.com/settings/account/api-tokens. To make it easier to explore our API, we recommend saving this token as an environment variable in your local dev environment:

export SHORTCUT_API_TOKEN="YOUR API TOKEN HERE"

This will allow you to copy and paste many examples in the documentation to try them out.

Requests made with a missing or invalid token will get a 401 Unauthorized response. All requests must be made over HTTPS. Tokens provide complete access to your Shortcut account, so keep them secure. Don’t paste them into your source code, use an environment variable instead. For security reasons, we will immediately invalidate any tokens we find have been made public.

Usage

import Shortcut from 'clubhouse-lib';

const client = Shortcut.create('your token value'); // See https://github.com/useshortcut/clubhouse-lib#how-to-get-an-api-token

client.listMembers().then(console.log);

client.getMember('')
  .catch(x => console.error(x.body))
  .then(console.log);

client.listProjects().then(console.log);

Play with It

You can play with it in your web browser with this live playground:

Documentation

Documentation for the REST API.

Dependencies (2)

Dev Dependencies (15)

Package Sidebar

Install

npm i clubhouse-lib

Weekly Downloads

3,401

Version

0.13.0

License

MIT

Unpacked Size

43.4 kB

Total Files

14

Last publish

Collaborators

  • charpeni
  • iwillig
  • maryjenel
  • shortcutops
  • shortcutuser