Coder Social home page Coder Social logo

mgw-sbex / node-parsec-sdk Goto Github PK

View Code? Open in Web Editor NEW
5.0 0.0 2.0 877 KB

UNOFFICIAL and WIP JavaScript/TypeScript SDK for Parsec remote desktop.

Home Page: https://www.npmjs.com/package/parsec-sdk

License: MIT License

TypeScript 97.93% JavaScript 2.07%
parsec parsec-cloud remote remote-desktop gaming remote-gaming-server cloud cloud-gaming low-latency game-streaming

node-parsec-sdk's Introduction

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-sdk

Documentation

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: '[email protected]',
      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-format

Linting code

npm run lint

Running unit tests with Jest

npm run test

Creating a build

npm run build

Generating documentation website

npm run generate-docs

License

MIT

node-parsec-sdk's People

Contributors

maciejpedzich avatar mgw-sbex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

node-parsec-sdk's Issues

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.