1.4.0 • Published 9 months ago

cc-data-api-wrapper v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

cc-data-api-wrapper

CubeCraft Data API Wrapper

Example

const API = require("cc-data-api-wrapper").default;

const timeout = 10 * 1000; // 10 seconds

const api = new API(timeout);

const leaderboards = await api.leaderboards.getAll();
const players = await api.players.getAll();
const xp = await api.xp.getAll();
const status = await api.status.getAll();
const goblinEggSkin = await api.marketplace.getBySearchName("goblin-egg-skin");

/** 
 * @param {NotionUpdateEvent} data
*/
const onUpdate = (data) => {};
const onError = (error) => console.error(error);
const reconnectOnDisconnect = true;

const eventSource = api.notion.listen(onUpdate, onError, reconnectOnDisconnect);
1.4.0

9 months ago

1.3.1

10 months ago

1.3.0

10 months ago

1.2.0

10 months ago

1.1.4

10 months ago

1.1.3

10 months ago

1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.13

10 months ago

1.0.12

10 months ago

1.0.11

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago