Skip to content

REST API

Zombslib provides a wrapper for the game’s REST API. The usage is very straightforward so we won’t go into much detail in this article. Documentation of all known API endpoints can be found here.

Example

const api = new RestClient({ unsafe: false });
api.getLeaderboard({
mode: "squad",
time: "all",
category: "kills",
}).then((r) => {
if (r.status === "success") {
console.log(r.players);
}
});
// This will throw an error and the request won't go through!
api.clearSessions("deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef");