forum

osu!api open beta

posted
Total Posts
90
show more
Avail_old_1
old

Still loads to do though :>

EDIT:

Available online for all you people at http://availu.net/osu/
Don't mind the ugly generator looks, still working on stylizing it.
Topic Starter
peppy
@Avail: you are currently doing *no* caching. That means every time that image is displayed, it is consuming huge resources on your server (and doing an underlying API call to osu!). best work on that if you plan on letting many people use it :p.
Winshley
I'm curious... in osu!mania, what are count300, count100, and count50 based from? Is it MAX, 300, and 200 respectively? If so, how to get the remaining hits though (e.g: 100 and 50)?
Avail_old_1

peppy wrote:

@Avail: you are currently doing *no* caching. That means every time that image is displayed, it is consuming huge resources on your server (and doing an underlying API call to osu!). best work on that if you plan on letting many people use it :p.
I plan on adding caching, if I ever learn how to.
Piotrekol
If you really have no idea how to do caching then I highly recommend that you at least use this: t/141331
Frizz
Just recently found this. Pretty cool, helps me a lot to gather information and whatnot. But I got questions to ask:
1. Is it possible to get more than 5 events/recent activities from /api/get_user? Since profile page offers more than the API does.
2. Pretty much just a suggestion. Perhaps can you add the information about infringements into /api/get_user?
Topic Starter
peppy
Please request additions on the github issues page!
Menchi
Ohhh!! :D
-Sandy Corzeta-
This like an almost a year threads, i don't know where do i ask about API things, most of users push me to the forum. And i don't know if this would be answered or not, but i kinda like to ask something..

The API stats for osu!Mania,
in the game there is a 200 Hit, but in stats there is no such thing for that...
so is that means 200 count as 300 hit on the stats? ... thank you !

#48 issues on GitHub
QuestCube
Is it possible to get API access for WIP projects, even if now official website exists yet?

If not, how likely is it to get the API access request accepted? I don't wan't to finish a project and then not being able to publish it because the api request was denied.
Topic Starter
peppy
go for it. it's automated.
QuestCube
Great, thanks!
Repflez
I want to request something (not an API request but some data). Can someone send me some of their cached hits on /api/get_match? I want to do (or try) something related to multiplayer matches but I need some data to test with, especially matches with FreeMod because I want to make sure that I did the mod enum right on my application.
Corin
Could we have the old "previously known as" field that used to be in the profile page in the API?
Would be quite useful seeing as it's not even in the users profile anymore.
Topic Starter
peppy
what for? and it is still in user profiles
Corin

peppy wrote:

what for? and it is still in user profiles
Say some guys app tracks names primarily (me, it cycles through logs for usernames not UIDs and editing the username to UID would use way too much in resources and would break logging, unless you want logs like <39283> Hi there greg) it'd make migrating a user from the old username to the new much easier/faster. As for the user profile, a quick view of source tells me I'm dumb and I need to hover over the username, didn't know that. Whoops.
Topic Starter
peppy
Logging based on username is horribly wrong. You should be using user id from the start..
Corin

peppy wrote:

Logging based on username is horribly wrong. You should be using user id from the start..
Not as easy as that seeing how my stuff comes directly from IRC with no middleman for conversion. If there was a version of Bancho that used UID; I'd use it and create a postprocessor for converting the UID to real name but its a pain creating a preprocessor to convert to UID and a postprocessor to convert from for human readable format especially seeing the quantity people talk in all channels and the amount of API calls that'll be, even with caching it'll still be heavy.

Probably phrased that wrong as I'm typing this from my phone but you get my drift.
Pannari
Would be great if there was a way to retrieve the current match ID of a user with

get_user
gearintellix
Sorry peppy,
your API not be possible with ajax (javascript),
result COR-Cross-Origin Request Blocked because some security things on HTTP request

but there is a solution for that with JSONP
with some additional callbacks

Please Fix it :D
Github issue #71
magnontobi
What about open source / easily to decompile java that is going to run on someone else's machine? What I mean is what would happen if people were to get hold of your api key and abuse it. Would that ban me on osu! for trying to make a cool application?
XPJ38

magnontobi wrote:

What I mean is what would happen if people were to get hold of your api key and abuse it. Would that ban me on osu! for trying to make a cool application?
Don't share your key. Request your users to enter their own API key. It's as simple as that.
magnontobi

XPJ38 wrote:

Request your users to enter their own API key.
That is one option. One that I have been thinking about at that. However, to get an API key you have to apply for access. The form on which you do so is quite obviously meant for developers only. Really, what I'd like is to have Peppy's opinion on what to do for this one.
gearintellix
oh man now osu api not worked :3 /

#why?
idk
Hi good initiative with this api ... Question ... Can we grab current user logged ?
shares5
Sorry if bumping 2 year old threads is frowned upon here, I was just wondering if it was possible to get somebodies country rank using the API, i can only find the global rank in "/api/get_user" any advice would be appreciated. Thanks
Howl
For API feature requests, please use the issue tracker here.
ukco
*sigh*
Naracion_old
Sounds cool. :D
Zozimoto
Ok
Scarlet Evans
Is it possible to access either the number of all ranked scores done or number of bonus PP a player have? Or maybe you can somehow access number of B, C and D-rank scores that player have?

If not, I think it would be a great idea to add it and I am going to explain why.

I heard many times about people wanting to write a calculator / spreadsheet / other, that would allow us to input a new PP score on a certain position of top #100 highscores and calculate how much net PP we would gain from it. I even thought about doing it myself.

The problem is: bonus pp based on the number of ranked maps you have a score on.

Let's start from writing down how you can make such calculation as inserting a new PP score on #N-th position. To do this, we need to:
  1. Subtract the bonus pp from total pp. The bonus is: 416.6667 (1- 0.9994^Number_of_scores).
  2. Subtract all the scores (weighted) that are on the previous positions (that is: #1 to #(N-1)). Not needed for new #1 score.
  3. Multiply the result by 0.95, to shift all the lower scores down by one position.
  4. We add the new score, weighted 0.95^(N-1).
  5. We add all the subtracted previously weighted scores from positions #1 ... #(N-1) back.
  6. We add Bonus PP.

    This gives us new Total PP, after adding a new score at N-th position. If there are some very small errors, they come mostly from our knowledge about top PP scores being imperfect. However, if you was to use things like https://ameobea.me/osutrack/ , instead of taking scores' PP from your profile page, you can make it really precise, at least up to 2-nd or 3-rd decimal!

Now, someone will ask: Can we somehow simplify it, so we don't need to know bonus PP? Well... not really.


Someone that have 100 ranked scores will have about 24.272 pp of bonus.
Someone that have 500 ranked scores will have about 108.02 pp of bonus.
Someone that have 1000 ranked scores will have about 188.036 pp of bonus.
Someone that have 2000 ranked scores will have about 291.214 pp of bonus.
Someone that have 5000 ranked scores will have about 395.941 pp of bonus.
Someone that have 10000 ranked scores will have about 415.636 pp of bonus.

So, you can't suppose that an average user have, for example: 200 pp of bonus (1090 ranked scores), because by doing this you could make some users gain or lose even about 10 pp with a single calculation! Purely from their difference with the bonus pp you assumed they have.
If you was to "assume that someone have X bonus pp" and subtract it during calculation, then simply shifted all the scores, multiplying them by 0.95, this person would "lose" 1pp for every 20 bonus pp he have above of your estimation and "gain" 1pp for every 20 bonus pp below your estimation.

Right now you can add number of SS, S and A scores, to get a minimum of the scores a player can have, but it would work almost only for the players that have many thousands of SS/S/A ranks and sometimes even only moderately (unless they have +10k scores...). Even with few 1000s' of plays, getting something like 0.5pp-1pp of error can result in calculation being useless, if the score was to be a very slight improvement or being somewhere at the lower half of top #100 list.
Also, the number of SS/S/A rank plays differ between the players. Some of them can have almost no B/C/D ranks and some of them can even have their plays doubled by adding these ranks into account, which can result in few PP of error too. What's the point of it, if the score was to give you +3pp, but error was -3pp and calculation would show you +0pp?

Someone could make a calculator, where a player can add a number of scores manually, leaving the problem to a player, but this number can be still hard to estimate even by themselves. Players with supporter could try to search for beatmaps they have SS/SSH/S/SH/A/B/C/D rank on and add these all scores, but even amongst them rarely anyone know or remember that you can do it.

.

So, the best solution would be to take an information about number of scores the player have directly from server, along with the top 100 PP values with precision up to few decimals. This could allow in making a very precise Calculator or Highscores Planner.

.


I would be really grateful for a response in this matter! Also, as a bonus, the most recent reddit post about it:

https://www.reddit.com/r/osugame/commen ... _pp_score/
EMENCII
I'm sorry if this is not the proper place, or if someone already asked this.

I would like to have some of the users' stats, just for personal information, to calculate some numbers etc.
My point is, is there a way to get the first 100-200k players based on their rankings?
I haven't asked for an api key yet, since I'm not even sure if I can do this.

So... Can I?
oliebol

EMENCII wrote:

So... Can I?
https://osu.ppy.sh/p/api ^^
EMENCII

oliebol wrote:

EMENCII wrote:

So... Can I?
https://osu.ppy.sh/p/api ^^
Yes, but... Isn't it too much data?
oliebol
¯\_(ツ)_/¯
EMENCII

oliebol wrote:

¯\_(ツ)_/¯
Well then, I'll try...

Though, giving a better look at the APIs, I should basically know their IDs or names....
So... Any ideas?
oliebol
Join the dev-discord server (http://discord.gg/ppy) and ask in the api-channel there
EMENCII

oliebol wrote:

Join the dev-discord server (http://discord.gg/ppy) and ask in the api-channel there
Thank you very much, your help was very appreciated :D
wokalek
Hello. I trying to grab information about top 100 scores of a specified beatmap.

But the server receives an empty response. Where error in my query?

	$.post(
"https://osu.ppy.sh/api/get_scores",
{
k : "my_api_key",
b : '1026729',
u : "Wilchq",
m : 0,
type : "string"
},
function(data) {
console.log(data);
}
);
Full Tablet

Vostok Sisters wrote:

Hello. I trying to grab information about top 100 scores of a specified beatmap.

But the server receives an empty response. Where error in my query?
If you specify the "u" parameter, it will return empty unless that player has an score in that map. Remove that parameter.
Also, try using '0' instead of 0 in the "m" parameter.
Put your api key in the "k" parameter if you haven't already.
show more
Please sign in to reply.

New reply