Skip to content

Simple and lightweight community contributed unofficial JS/TS SDK for Gather Town's HTTPS and WebSocket APIs. πŸŒπŸ•ΉπŸ’¬

License

Notifications You must be signed in to change notification settings

warengonzaga/gathertown.js

Repository files navigation

GatherTownJS Featured on Openbase

created by release star npm downloads license

repo banner

Simple and lightweight community contributed unofficial JavaScript/Typescript SDK for Gather Town's HTTPS and WebSocket APIs. πŸŒπŸ•ΉπŸ’¬

⚑ Features

Currently it supports Gather HTTP API GET and POST requests. We are currently working on Gather Websocket API.

HTTP API (100% Coverage)

  • GET getMap()
  • GET getEmailGuestList()
  • POST createSpace()
  • POST setEmailGuestlist()
  • POST setMap()

NOTE: Currently working on Websocket API support as suggested by the team at Gather. Check out the discussion here: #10 and #11.

πŸ“– Documentation

The complete documentation can be found here:

docs

πŸ•ΉοΈ Usage

Example usage of the GatherTownJS.

const GATHER = require('gathertown.js'); // add gather package
const access = require('./config.json'); // load your apikey
const gather = GATHER(access.key); // access keys

// some variables
const spaceId = 'space-id/space-name';
const mapId = 'map-name';

function map() {
  gather
    .getMap({ spaceId, mapId })
    .then((data) => console.log(data))
    .catch((err) => console.log(err));
}

map();

βš“ With Hooks

const { useGather } = require('gathertown.js');
const access = require('./config.json'); // load your apikey

// some variables
const spaceId = 'space-id/space-name';
const mapId = 'map-name';

function map() {
  // load only needed functions
  const { getMap } = useGather(access.key);

  getMap({ spaceId, mapId })
    .then((data) => console.log(data))
    .catch((err) => console.log(err));
}

map();

🎯 Contributing

Contributions are welcome, create a pull request to this repo and I will review your code. Please consider to submit your pull request to the dev branch. Thank you!

Read the project's contributing guide for more info.

πŸ’¬ Discussions

For any questions, suggestions, ideas, or simply you want to share your experience in using this project, feel free to share and discuss it to the community!

πŸ› Issues

If you're facing a problem in using GatherTownJS please let me know by creating an issue here. I'm here to help you!

πŸ€ Sponsors and Supporters

Love what I do? Send me some love or coffee!? πŸ’–β˜•

Can't send love or coffees? πŸ˜₯ Nominate me for a GitHub Star instead! Your support will help me to continue working on open-source projects like this. πŸ™πŸ˜‡

πŸ“‹ Code of Conduct

Read the project's code of conduct.

πŸ“ƒ License

GatherTownJS is licensed under The MIT License.

πŸ“ Author

GatherTownJS is created by Waren Gonzaga, with the help of awesome contributors.

contributors


πŸ’»πŸ’–β˜• by Waren Gonzaga | YHWH πŸ™