Giter Site home page Giter Site logo

hurshagrawal / clubhouse-lib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from useshortcut/shortcut-client-js

0.0 0.0 0.0 574 KB

The official Node.js client library for the Clubhouse API.

Home Page: https://clubhouse.io/api

JavaScript 1.78% Shell 0.64% TypeScript 97.58%

clubhouse-lib's Introduction

Clubhouse logo

Clubhouse-lib

A library for interacting with the Clubhouse REST API

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


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 Clubhouse API uses token-based authentication, you will need one to use this library.

To generate an API token, go to https://app.clubhouse.io/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 CLUBHOUSE_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 Clubhouse 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 Clubhouse from 'clubhouse-lib';

const client = Clubhouse.create('your token value'); // See https://github.com/clubhouse/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.

clubhouse-lib's People

Contributors

andrewchilds avatar charpeni avatar dependabot[bot] avatar eliperkins avatar iwillig avatar j-martin avatar jeremyheiler avatar joshbeckman avatar maryjenel avatar mattspitz avatar webfella avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.