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

Was this thread helpful?


  • Total voters
    21

TERTO

Rare Pika
Joined
Jun 12, 2022
Messages
99
Points
20

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.
Here is a bot by me and @mallusrgreat which makes full use of the PikaNetwork API!
oh dang nice
 

TERTO

Rare Pika
Joined
Jun 12, 2022
Messages
99
Points
20
can u tell me how to see stats using specific servers like survival, lifesteal , OPP etc
 
Top