Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

range-sdk

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

range-sdk

Range SDK for node

latest
npmnpm
Version
1.6.0
Version published
Weekly downloads
1
Maintainers
4
Weekly downloads
 
Created
Source

Range Logo

Range Node.js SDK · License Twitter

Range helps teams know what’s happening, stay in sync, and actually feel like a team. It’s thoughtfully designed software that helps teams share daily check-ins, track goals, and run better meetings. So you can do your best work together.

Everything is easier in Range because it works with the tools you already use. Your tasks, documents, and code changes are already in Range, so you don’t have to enter data twice.

Find out more at www.range.co.

About

The Range Node SDK provides access to the Range API from applications written in server-side javascript.

This package makes use of Range API Keys, be careful to keep these keys secure. Avoid checking them into git repositories or leaving them in unsecured source code.

Documentation

See this readme and the API docs.

Installation

npm install range-sdk --save

Usage

This package needs to be configured with an API key which you can generate by visiting your developer dashboard. The key can be passed in via the RANGE_ACCESS_KEY environment variable, or as a constructor argument.

const Range = require('range-sdk');
const rangeClient = new Range('deadbeef1234567890');

The SDK uses promises:

new Range()
  .listTeams()
  .then(resp => console.log(resp))
  .catch(err => console.error(err.message));

or you can use await:

const team = await new Range().readTeam(productTeamID);

Errors are typed; both NetworkError and APIError inherit from RangeError.

new Range()
  .findUser({ email: 'no-one@mycorp.com' })
  .then(resp => console.log(resp))
  .catch(err => {
    if (err instanceof Range.APIError && err.code === Range.ErrorCodes.NOT_FOUND) {
      console.log('A Range user does not exist for that email');
    } else {
      console.error(err.message);
    }
  });

FAQs

Package last updated on 27 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts