Learn how to join our server and start playing in 60 seconds!
Play Now

Pika Network API Wrapper (For Node.js)

mallusrgreat

Epic Pika
Joined
Nov 2, 2020
Messages
115
Points
36
IGN
mallusrgreat

pika-api.js​

Hello.


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:

lfabrax

Rare Pika
Joined
Oct 13, 2023
Messages
83
Points
16
IGN
lfabrax

pika-api.js​

Hello.


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

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(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
});
pika.getProfile("mallusrgreat");
pika.getRecap("d1a2a364-148a-4efe-af1e-f40cd7973d4f");

Bye.
I got a question where is the function implementation can i see it? They are all ready to use functions
 

lfabrax

Rare Pika
Joined
Oct 13, 2023
Messages
83
Points
16
IGN
lfabrax
lol i forgot github exists lol yeah thanks it helped a ton
 
OP
OP
mallusrgreat

mallusrgreat

Epic Pika
Joined
Nov 2, 2020
Messages
115
Points
36
IGN
mallusrgreat
forgot to say but exponential backout is added when we get rate limited
 
OP
OP
mallusrgreat

mallusrgreat

Epic Pika
Joined
Nov 2, 2020
Messages
115
Points
36
IGN
mallusrgreat
Implemented skypvp gamemode and the 2 new lb stats relating to it in v1.1.0
 
OP
OP
mallusrgreat

mallusrgreat

Epic Pika
Joined
Nov 2, 2020
Messages
115
Points
36
IGN
mallusrgreat
Added getGuild function which lets you get information about a specific guild
 
Top