pika.api v1.0.1
Table of contents:
PikaAPI
Most advanced Pika-Network Server api in nodejs
.
.
Made with ❤️ by Max Jackson
Classes / Enums / Methods
PikaAPI (Class):
- Method: getPlayerProfile(ign: string): Promise
- Method: getBedwarsLeaderboard(ign: string, interval: string, mode: string): Promise
- Method: getSkywarsLeaderboard(ign: string, interval: string, mode: string): Promise
- Method: getLeaderboard(type: string, stat: string, interval: string, mode: string, offset: number, limit: number): Promise
PikaPlayerResponses (Enum):
- Property: PlayerExists = 200
- Property: PlayerDoesntExist = 400
- Property: InvalidUrl = 404
LeaderboardKey (Enum):
- Property: BowKills = "Bow kills"
- Property: Kills = "Kills"
- Property: GamesPlayed = "Games played"
- Property: ArrowsShot = "Arrows shot"
- Property: HighestWinStreakReached = "Highest winstreak reached"
- Property: BedsDestroyed = "Beds destroyed"
- Property: Losses = "Losses"
- Property: ArrowsHit = "Arrows hit"
- Property: MeleeKills = "Melee kills"
- Property: FinalKills = "Final kills"
- Property: Deaths = "Deaths"
- Property: VoidKills = "Void kills"
- Property: Wins = "Wins"
Gamemodes (Enum):
- Property: OpFactions = "opfactions"
- Property: Bedwars = "bedwars"
- Property: OpPrison = "opprison"
- Property: OpSkyblock = "opskyblock"
- Property: ClassicSkyblock = "classicskyblock"
- Property: Survival = "Survival"
- Property: Kitpvp = "kitpvp"
- Property: Practice = "practice"
- Property: Skywars = "skywars"
- Property: Lifesteal = "Lifesteal"
BedwarsModes (Enum):
- Property: Solo = "SOLO"
- Property: Doubles = "DOUBLES"
- Property: Triples = "TRIPLES"
- Property: Quads = "QUADS"
- Property: All = "ALL_MODES"
SkywarsModes (Enum):
- Property: Solo = "SOLO"
- Property: Doubles = "DOUBLES"
- Property: Triples = "TRIPLES"
- Property: Quads = "QUADS"
- Property: All = "ALL_MODES"
Stat (Enum):
- Property: Played = "played"
- Property: BedDestroyed = "BED_DESTROYED"
- Property: FinalKills = "FINAL_KILLS"
- Property: HighestWinStreak = "HIGHEST_WIN_STREAK"
- Property: Wins = "wins"
- Property: Kills = "kills"
Interval (Enum):
- Property: Weekly = "weekly"
- Property: Monthly = "monthly"
- Property: Yearly = "yearly"
- Property: Total = "total"
Example
Here is one of the examples of getting a player profile:
const Pika = require("pika.api");
const PikaAPI = new Pika.PikaAPI();
const Profile = await PikaAPI.getPlayerProfile("F91");
console.log(Profile) /* {
status: STATUS_NUMBER,
data: {
friendStatus: "ONLINE" | "INVISIBLE",
discord_verified: boolean,
lastSeen: number,
ranks: [],
email_verified: boolean,
discord_boosting: boolean,
clan: Clan | null,
rank: {
level: number,
experience: number,
percentage: number,
rankDisplay: string
},
friends: SimplePlayerProfile[],
username: string
}
} */
License
Copyright 2023 Max Jackson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.