d-gubert / Rocket.Chat.Game-SDK-Demo

Repository from Github https://github.comd-gubert/Rocket.Chat.Game-SDK-DemoRepository from Github https://github.comd-gubert/Rocket.Chat.Game-SDK-Demo

Rocket.Chat.Game-SDK-Demo

This is the demo that shows how the AppEmbeddedSDK works. Below are the steps to help you start.

  1. Clone the Apps.engine repo and checkout the alpha branch
git clone git@github.com:RocketChat/Rocket.Chat.Apps-engine.git
cd Rocket.Chat.Apps-engine
git checkout -b alpha origin/alpha
  1. Install the depencies and compile the project
npm install
npm run compile
  1. Import AppEmbeddedSDK
import { AppEmbeddedSDK } from '[the path to apps.engine]/apps.engine/client/AppEmbeddedSDK';
  1. Create instance and call the API
async getUserInfo() {
  const sdk = new AppEmbeddedSDK();
  const user = await sdk.getUserInfo();
  console.log(JSON.stringify(user, null, 4));
}

Please see here for the detail.

About

License:MIT License


Languages

Language:JavaScript 83.7%Language:CSS 11.8%Language:HTML 4.5%