MrSpeedy35
Legendary Pika
- Joined
- Jan 25, 2022
- Messages
- 415
- Points
- 63
What is an API?
An API (Application Programming Interface) is a way for two or more computers to communicate with eachother. It is a type of software interface, offering a service to other pieces of software.PikaNetwork has an API?
Well yes, sadly it is not known to most of the programmers in the PikaNetwork community. But today I am going to tell you all about PikaNetwork's API.
VARIABLES
playerIGN = The player's in-game name.
interval = Which time period? (weekly/yearly/monthly/total)
mode = Which mode? [BEDWARS (SOLO/DOUBLES/TRIPLES/QUADS/ALL_MODES)], [SKYWARS (SOLO/DOUBLES/ALL_MODES)]
stat = Which leaderboard stat? {played/BED_DESTROYED/FINAL_KILLS/HIGHEST_WIN_STREAK/wins/kills}
offset = Which position the leaderboard starts from. (For example, if offset is 5, the leaderboard starts from #6. If it's 0, the leaderboard starts from #1)
limit = Which position the leaderboard ends at. (For example, if the limit 10, it will show the top 10 players)
gamemode = Any PikaNetwork gamemode. (e.g. opfactions, bedwars, opprison, opskyblock, classicskyblock, survival, kitpvp, practice, skywars, lifesteal)
RESPONSES
200 (The player exists)
400 (The player is not registered in the PikaNetwork database)
404 (There was a mistake in the link)
Profile API (https://stats.pika-network.net/api/profile/${playerIGN})
The profile API can be used to get a player's friend status, email and discord verification status, friend list, rank information, friend list, guild information, etc.
Bedwars API (https://stats.pika-network.net/api/profile/${playerIGN}/leaderboard?type=bedwars&interval=${interval}&mode=${mode})
The bedwars API can be used to get bedwars related stats such as final kills and bed breaks.
Skywars API (https://stats.pika-network.net/api/profile/${playerIGN}/leaderboard?type=skywars&interval=${interval}&mode=${mode})
The skywars API can be used to get skywars related stats such as kills, bow shots, ender pearls, etc.
Leaderboards API (https://stats.pika-network.net/api/leaderboards?type=${gameMode}&stat=${stat}&interval=${interval}&mode=${mode}&offset=${offset}&limit=${limit})
The leaderboards API can be used to view leaderboards of bedwars or skywars in certain offsets and time intervals.
Thanks to @A4As and @NOT_YAHYA for helping me with this forum post.
Last edited: