remote.it
v0.48.1
Published
remote.it JavaScript/node client library
Readme
remote.it.js
JavaScript/node remote.it client library
Install
npm install --save remote.itUsage
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`
r3.user
.login('username', 'password')
// Get all devices for the given user
.then(r3.devices.all)
.then(console.log)
.catch(console.error)Notes
- You must use either an
apiKey,accessKeyordeveloperKeyto perform user authentication - You must log a user in or set the
tokenproperty (r3.token = '...') to perform user specific tasks via the API. - Typescript type definition files are included!
Examples
Please see /examples for some examples of how to use remote.it.js.
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 startContribution
Pull requests welcome! Please format your code using Prettier (npm run prettier) and lint with TSLint (npm run lint). Thanks!
