Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
pikanetwork.js
Advanced tools
Readme
pikanetwork.js is a NodeJS module which allows you to interact with the PikaNetwork API easily.
Node.js 14+ or newer is required
npm install pikanetwork.js
yarn add pikanetwork.js
pnpm add pikanetwork.js
const { Profile } = require("pikanetwork.js");
async function fetchProfile() {
const playerIGN = "PikaNetwork";
const profile = new Profile(playerIGN);
try {
const ranks = await profile.getRankInfo(); // Get information about the player's ranks.
const levelling = await profile.getLevellingInfo(); // Get information about the player's network level and rank.
const guild = await profile.getGuildInfo(); // Guild information about the player's guild.
const friends = await profile.getFriendList(); // Get a list of friends the player has.
const joinInfo = await profile.getJoinInfo(); // Get information about the player's estimated first join and last join.
const miscInfo = await profile.getMiscInfo(); // Get other miscellaneous information.
} catch (error) {
console.error("Error fetching data:", error);
}
}
fetchProfile();
const { Punishments } = require("pikanetwork.js");
async function fetchPunishments() {
const playerIGN = "MrFrenco";
const punishment = new Punishments(playerIGN);
try {
const punishments = await punishment.getPunishments(); // Get a list of all of the player's punishments.
const issued = await punishment.getIssuedPunishments(); // Get a list of punishments issued by this player.
} catch (error) {
console.error("Error fetching punishments:", error);
}
}
fetchPunishments();
const { PlayerLeaderboard } = require("pikanetwork.js");
async function fetchPlayerLeaderboard() {
const playerIGN = "PikaNetwork";
const interval = "total"; // total, monthly, weekly.
const mode = "ALL_MODES"; // ALL_MODES, SOLO, DOUBLES, TRIPLES, QUAD.
const gamemode = "bedwars";
// bedwars, skywars, rankedpractice, unrankedpractice, kitpvp,
// classicskyblock, survival, lifesteal, opskyblock, oplifesteal
// opfactions, opprison. These are all options for gamemode.
const playerLeaderboard = new PlayerLeaderboard(playerIGN, interval, mode, gamemode);
try {
const leaderboard = await playerLeaderboard.getLeaderboardData(); // Get the player's leaderboard based on set parameters.
const kdr = await playerLeaderboard.getKDR(); // Get the player's kill/death ratio.
const fkdr = await playerLeaderboard.getFKDR(); // Get the player's final kill/final death ratio.
const wlr = await playerLeaderboard.getWLR(); // Get the player's win/loss ratio.
} catch (error) {
console.error("Error fetching data:", error);
}
}
fetchPlayerLeaderboard();
const { TotalLeaderboard } = require("pikanetwork.js");
async function fetchTotalLeaderboard() {
const interval = "total"; // total, monthly, weekly.
const mode = "ALL_MODES"; // ALL_MODES, SOLO, DOUBLES, TRIPLES, QUAD.
const stat = "wins"; // Too many to be listed (varies from game to game).
const gamemode = "bedwars";
// bedwars, skywars, rankedpractice, unrankedpractice, kitpvp,
// classicskyblock, survival, lifesteal, opskyblock, oplifesteal
// opfactions, opprison. These are all options for gamemode.
const offset = "0";
const limit = "25";
// The offset is at which postion the leaderboard starts (0 = #1 is the first).
// The limit is upto how many players will be shown, the limit is capped at 25.
const totalLeaderboard = new TotalLeaderboard(interval, mode, stat, offset, limit, gamemode);
try {
const leaderboard = await totalLeaderboard.fetchLeaderboardData(); // Get the total leaderboard based on set parameters.
} catch (error) {
console.error("Error fetching data:", error);
}
}
fetchTotalLeaderboard();
const { Staff } = require("pikanetwork.js");
async function fetchStaffList() {
try {
const staff = new Staff();
const list = await staff.getStaffList();
console.log(list);
} catch (error) {
console.error("Error fetching data:", error);
}
}
fetchStaffList();
Contributions are welcome! If you have any suggestions or issues, please open an issue or pull request.
This project is licensed under the MIT License. See the LICENSE.
If you're having issues with a method, or the wrapper isn't working as expected, you can DM tejaslamba or mrspeedy35 on Discord.
Please note that the data given out by our code belongs to PikaNetwork.
FAQs
An easy to use PikaNetwork API wrapper.
The npm package pikanetwork.js receives a total of 7 weekly downloads. As such, pikanetwork.js popularity was classified as not popular.
We found that pikanetwork.js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.