0.2.3 • Published 4 years ago
parsec-sdk v0.2.3
node-parsec-sdk
UNOFFICIAL and WIP JavaScript/TypeScript SDK for Parsec remote desktop.
DISCLAIMER
This is an UNOFFICIAL package, which is also very early in development. The vast majority of necessary features is missing at this point. See the Roadmap project and issues on Github to get a list of upcoming functionalities.
I AM NOT associated with Parsec or Unity in any way.
Installation
npm install --save parsec-sdkDocumentation
Online documentation is automatically generated using TypeDoc and hosted on Github Pages. It's available on https://maciejpedzich.github.io/node-parsec-sdk/
Code example
// CommonJS (ES5)
const { Client } = require('parsec-sdk');
// Module import (ES6+ and TypeScript)
import { Client } from 'parsec-sdk';
const parsec = new Client();
async function authDemo() {
try {
await parsec.authPersonal({
email: 'parsec-account-email@example.com',
password: 'ParsecAccountP4ssword!',
tfa: '123456' // OPTIONAL TFA code
});
console.log(`Peer ID: ${parsec.peerID}\nSession ID: ${parsec.sessionID}`);
} catch (error) {
console.error(error);
}
}
async function hostsDemo() {
try {
const { data } = await parsec.getHosts({ mode: 'desktop' });
console.log(data);
} catch (error) {
console.error(error);
}
}
authDemo();
hostsDemo();Development
After cloning the repository, simply cd into the repository's directory in your CLI and run npm install
Manually formatting code
npm run prettier-formatLinting code
npm run lintRunning unit tests with Jest
npm run testCreating a build
npm run buildGenerating documentation website
npm run generate-docsLicense
MIT