General Public API

ArrayLists

Dragonball Partier
Elite
Sep 8, 2015
1,180
832
9,392
I think it would be a great idea to add in a public API which is READ ONLY (Meaning that the user can only retrieve the stats and they cannot edit the stats in any way). This would be useful for a stats page and customized stats websites that users can create using their own knowledge of web development and this API.

It'll be a cool addition to PZ, and will also allow users to check their stats without having to go into the actual game and checking it themselves (That is if there is a stats page/website). I do understand that it may take some time and it isn't really a top-priority thing, but it is a great thing to add.

What do you guys think? Would it be a great addition?
 
It sounds confusing but that may be because I don't understand. Sorry -0 until I understand it more...
Pretty much a way to retrieve stats without having to go in-game and going into each game and finding the stats. It can be hosted on a website of some sort and players can view their own stats and other's stats.
 
  • Like
Reactions: Timelord
I'm all up for this yet what if a player doesn't want their stats viewed by other players?
+1
 
I'm all up for this yet what if a player doesn't want their stats viewed by other players?
+1
A toggleable option can be implemented and it can simply be checked automatically before loading the player's stats.
 
  • Like
Reactions: Timelord
A toggleable option can be implemented and it can simply be checked automatically before loading the player's stats.
Yea that's a option, yet will the default setting be set to show? Some players might not even know it exists yet want their stuff private.
 
Adding an API is a good suggestion but it seems unlikely considering there's no way to view player statistics at the moment. It would be fairly easy to implement, which makes me wonder why they haven't done it already. Perhaps they don't want to expose this data to the public?

Nonetheless, I'd like to see this added because it would be nice for developers to play around with some stats.
 
Adding an API is a good suggestion but it seems unlikely considering there's no way to view player statistics at the moment. It would be fairly easy to implement, which makes me wonder why they haven't done it already. Perhaps they don't want to expose this data to the public?

Nonetheless, I'd like to see this added because it would be nice for developers to play around with some stats.
Well, I was hoping for this to be implemented so that I can create a simple website that showcases a player's stats based on what they typed in the search option, and it would print out their rank, murder rank, etc. Which would be cool as it could be hooked up to some server that grabs the information.
 
Well, I was hoping for this to be implemented so that I can create a simple website that showcases a player's stats based on what they typed in the search option, and it would print out their rank, murder rank, etc. Which would be cool as it could be hooked up to some server that grabs the information.

Yeah, that's the idea. Doesn't have to be for a website either. Anything that can retrieve information with a GET request.

Would like to hear from a developer about this. Are statistics meant to be hidden from players or has it just not been implemented yet for whatever reason?
 
Yeah, that's the idea. Doesn't have to be for a website either. Anything that can retrieve information with a GET request.

Would like to hear from a developer about this. Are statistics meant to be hidden from players or has it just not been implemented yet for whatever reason?
I understand that it can simply be retrieved using a get request, but where would that information be "dumped" so that users can view it? The only options would really be a website or some sort of plugin that displays the user's stats using a search.
 
I understand that it can simply be retrieved using a get request, but where would that information be "dumped" so that users can view it? The only options would really be a website or some sort of plugin that displays the user's stats using a search.

When you send a request to the URL, it returns whatever data you requested. You could do it in Python, for example:

import requests
r = requests.get("http://api.mcpz.net/api/player/Limitre")
print(r.content)

The variable r is the request and content is the data we actually want to use. That's just a simple example of how it could work. You don't necessarily have to dump the data if you're just making a request. Someone might want to write a script that grabs a player's statistics or create an app that does the same thing. The possibilities are endless, which is why it's a pretty neat feature.
 
When you send a request to the URL, it returns whatever data you requested. You could do it in Python, for example:

import requests
r = requests.get("http://api.mcpz.net/api/player/Limitre")
print(r.content)

The variable r is the request and content is the data we actually want to use. That's just a simple example of how it could work. You don't necessarily have to dump the data if you're just making a request. Someone might want to write a script that grabs a player's statistics or create an app that does the same thing. The possibilities are endless which is why it's a pretty neat feature.

Why is coding so confusing ;-;
 
  • Like
Reactions: Limitre
Why is coding so confusing ;-;
It's hard at first glimpse yet I'm still a novice xD. I know basic java and basic python.

Basically what they are saying is get stats from player on mcpz server. Then show this information on screen.
Get info - print (show on screen)
...
@Limitre @HAIAREARRAY
I'm pretty sure it's for the admins to decide how they want to do it or make a conversation about it so it doesn't full this wonderful suggestion( may confuse others into thinking it's something else) just saying would be much appreciated.
 
When you send a request to the URL, it returns whatever data you requested. You could do it in Python, for example:

import requests
r = requests.get("http://api.mcpz.net/api/player/Limitre")
print(r.content)

The variable r is the request and content is the data we actually want to use. That's just a simple example of how it could work. You don't necessarily have to dump the data if you're just making a request. Someone might want to write a script that grabs a player's statistics or create an app that does the same thing. The possibilities are endless, which is why it's a pretty neat feature.
I've worked with APIs a lot. I understand how they work and what the possibilities are. I know how to make one aswell. But I do appreciate that you tried to explain it.
 
I've worked with APIs a lot. I understand how they work and what the possibilities are. I know how to make one aswell. But I do appreciate that you tried to explain it.

Yeah, I wasn't sure but I think you'd agree, it wouldn't be hard for MCPZ to implement.
 
  • Like
Reactions: ArrayLists
Yeah, I wasn't sure but I think you'd agree, it wouldn't be hard for MCPZ to implement.
All they really need to do is to pull it off some server as you stated possibly api.mcpz.net or their private database. From there they can use that stuff to create the methods. Not that hard (As you just said).
 
All they really need to do is to pull it off some server as you stated possibly api.mcpz.net or their private database. From there they can use that stuff to create the methods. Not that hard (As you just said).

Presumably they're already loading the data from a database in-game to display the statistics, so it's really just a case of formatting the data and listening for requests over a web server. They have the resources to do it.
 
  • Like
Reactions: ArrayLists