mallusrgreat
Epic Pika
- Joined
- Nov 2, 2020
- Messages
- 115
- Points
- 36
- IGN
- mallusrgreat
pika-api.js
Hello.pika-api.js
Easiest way to interact with the Pika Network API. Latest version: 1.2.0, last published: 4 months ago. Start using pika-api.js in your project by running `npm i pika-api.js`. There are no other projects in the npm registry using pika-api.js.
www.npmjs.com
pika-api.js is an NPM package that helps to interact with the public Pika Network API.
Features
- Fully type-safe
- Complete type safety in runtime with zod
- Easy to understand
- Fully promise-based
- Built with modern and blazing fast technology
- Supports both CommonJS and ESModules
- TypeScript supported
Installation
Bash:
npm install pika-api.js
yarn add pika-api.js
pnpm add pika-api.js
Usage
JavaScript:
import Pika from "pika-api.js";
// or
const Pika = require("pika-api.js");
const pika = new Pika.PikaNetwork();
pika.getTotalLeaderboard(Pika.Gamemode.BedWars);
pika.getLeaderboard({
gamemode: Pika.Gamemode.BedWars,
leaderboardType: Pika.LeaderboardType.Kills,
interval: Pika.Interval.Weekly, // Not required, defaults to Interval.AllTime
mode: Pika.Mode.Solo, // Not required, defaults to Mode.AllModes
limit: 10, // Not required, defaults to 15
offset: 15, // Not required, defaults to 0
});
pika.getProfile("mallusrgreat");
pika.getProfileLeaderboard({
username: "BlakD3mon_",
gamemode: Pika.Gamemode.BedWars,
interval: Pika.Interval.Weekly, // Not required, defaults to Interval.AllTime
mode: Pika.Mode.Solo, // Not required, defaults to Mode.AllModes
limit: 10, // Not required, defaults to 15
});
pika.getRecap("d1a2a364-148a-4efe-af1e-f40cd7973d4f");
Bye.
Last edited: