joltite.js
is a library for browsers & node that allows you to easily interact with the Game Jolt API.
This library supports version 1.2
of the Game Jolt API and implements user authentication, sessions, scores, trophies, data storage and more.
Using npm:
$ npm install joltite.js
Using yarn:
$ yarn add joltite.js
Using unpkg CDN:
<script src="https://unpkg.com/[email protected]/dist/joltite.min.js"></script>
First you need to create a new GameJolt
instance:
import { GameJolt } from 'joltite.js';
const api = new GameJolt({ gameId, privateKey });
Then you can call the API endpoints. Below is an example of score fetching:
const response = await api.scores.fetch();
if (response.success) {
console.log(response.scores);
}
Some endpoints require an authenticated user. Below is an example of user authentication:
const response = await api.login({ username, token });
if (response.success) {
// Successfully logged in.
}
The documentation for this library can be found here
Feel free to dive in! Open an issue or submit PRs.
This project follows the Contributor Covenant Code of Conduct.
MIT © Thomas Bowen