JSPM

  • Created
  • Published
  • Downloads 314
  • Score
    100M100P100Q101486F
  • License MIT

remote.it JavaScript/node client library

Package Exports

  • remote.it

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remote.it) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

remote.it client

JavaScript/node remote.it client library

Install

npm install --save remote.it

Usage

import setup from 'remote.it'

const r3 = setup({
  // Optional: your developer key
  // developerKey: '...',
  // Optional: an access generated by using your developer key
  // accessKey: '...',
  // Optional: a valid user token to be used for authentication
  // token: '...',
  // Optional: configure what version of the API to use by default.
  // apiURL: 'https://api.remot3.it/apv/v26',
})

// Log the user in and set their `token` and `authHash`
await r3.user.login('username', 'password')

// Get all devices for the given user
r3.devices
  .all()
  .then(console.log)
  .catch(console.error)

Notes

  • You must use an apiKey, accessKey or developerKey to perform user authentication
  • You must log a user in or set the token property (r3.token = '...') to perform user specific tasks via the API.
  • Typescript type definition files are included

Development

# Install the proper node version
nvm install
nvm use

# Install dependencies
npm install

# Test (single run)
npm test

# Watch for changes and automatically run tests and build
npm start