forum

API (Scores etc) [added]

posted
Total Posts
7
This is a feature request. Feature requests can be voted up by supporters.
Current Priority: +44
Topic Starter
ss23
I understand there was a previous request for this, but it was closed (therefore I can't post amendments).
The reason for closing (I think) was basically a lack of use case, as well as it taking effort etc. This feature request comes with a use case (I would like to provide a !stats in an external IRC network), and to help with the effort thing, I'm happy to make it myself and release it as part of the https://github.com/peppy/osu-public/ repository (or similar if peppy would rather).

Prefered interface would be RESTful json, but if XML or something was used instead, that wouldn't bother me too much (I just feel json is going to be the best for this).

This could be expanded to allow more than scores/user stats, but those are the things I want at the moment.
Sync
I'd star this, but I am out of stars for September. In return, I will reply with a "Support!".

EDIT:
[21:06:32] <ss23> Ben: Um, bumping doesn't do anything in that forum dude

Making me feel bad, thanks a lot ;_;
Ijah_old
You can always just scrape and get BANNNNNNNNNRF
But yeah, I would love to see some sort of API, as doing it via scraping uses guite a bit of Peppy's bandwidth :(

One idea would be requests like [osuurl]/score-api.php?
Variables:
?rankedscore=1
?totalscore=1
?accuracy=1
?level=1
?replayswatched=1
and so on...
1 would naturally be the "display" flag printing enabled entries in order into an HTML/XML file which can be accessed remotely by others using cURL/url_fopen or whatever.

This could also apply to beatmaps' statuses such as:

?status=1 //prints either ranked,pending,graved
?bubbles=1 //prints bubble status, popped, bubble number, etc.
?sp=1 //prints current star count
?pc=1 //prints total play count
Totally support the idea of an API.
Plus, it would take close to no effort to implement, just a few SQL queries and such.
Topic Starter
ss23
The topic of scraping was already brought up in a previous topic (one that prompted me to create this topic) viewtopic.php?f=5&t=62539 - and it seems that if peppy catches you doing it, you'll be IP banned.

As for the implementation details of an API, I'm not fussed at all, as long as its either documented or opensource. If peppy wants some written up before he'll work on it, I'm fine with that too, but no point doing it if he's not going to write one at all I guess.
MoonShade
I'm running an osu! community site and would LOVE a json/xml API for user stats, but I'm also thinking of more provided info.
  1. One can make own types of signatures with more/other infos like "my latest maps"
  2. For Fansites, one can add new features just like "newest maps of the community", or "newest ranks of the community/best players", "best modders in the community" (with most kusosu), the possibilities :!:
  3. peppy can control the access and the cashing of the data and can thus regulate the load of the server and prevent flooding
  4. It would prevent people from making HTTP-Bots in order to gain the wanted information, cause this would use more bandwith and allow flooding (and is maybe not allowed at all), also a good API is a lot easier to use for the programmer, so it's really win-win
I hope this gets implemented!

Edit: In another thread, peppy wrote that he hasn't got plans in implementing an API atm... why? Well I hope I gave some points on why such an API is usefull in many cases and for people who want to expand the osu! experience.
I also came across various browser games with such an API for user stats, and people are using this in fact to make their own signatures or fansite services to promote the game and themselves in a way they like, resulting in a bigger community. I think opening osu! a bit to other programmers with an API could actually open the game to other people as well, but that's only a sitenote here.
If it is for the efford of making such an API, I think we can gather a bunch of people willing to help, if this is needed at all. It's not just some SQL stuff like Ijah wrote if you want good cashing and maybe flood protection but it shouldn't be that impossibly hard.
peppy
While we're here, this is already available on request. Please PM me with specific of how/why you want access if interested.
show more
Please sign in to reply.

New reply