Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve ranking for top 10.000 #102

Open
thehowl opened this issue Aug 7, 2015 · 13 comments
Open

Retrieve ranking for top 10.000 #102

thehowl opened this issue Aug 7, 2015 · 13 comments

Comments

@thehowl
Copy link

thehowl commented Aug 7, 2015

Perhaps also more than 10.000, although allowing it to do only at a very limited rate (like get_replay)

Of course, this actually means that we get something like /api/get_top, and there are p and l which are kinda self-explanatory on what they do, and the requester is allowed to know who is each rank's player, up to the 10.000th rank.

@jxu
Copy link

jxu commented Jul 26, 2016

Yes, this would be useful. Otherwise I'll have to scrape the rankings. I don't imagine this being too taxing on the website. In fact, top 20k or 100k would be more useful, as top 10k doesn't cover all users of interest (ex. cheaters)

@firedigger
Copy link

Really need this

@grumd
Copy link

grumd commented Nov 28, 2018

Hey @peppy! This is a very old request needed by many people here, is there any update on whether it's possible to add an endpoint? Would be enough to receive a list of IDs for up to top 100k players, or at least top 10k for each country separately (like it's done on the website). I imagine a lot of people resort to scraping the website and I really wouldn't want to put that extra load on your servers if an API was available. Thanks!

@jxu
Copy link

jxu commented Nov 28, 2018

@grumd to actually get his attention try tweeting and mentioning him

@grumd
Copy link

grumd commented Nov 28, 2018

So I've noticed api v2 is being implemented and this endpoint is already actually done. The only problem I have is that it seems like it's not possible to autorize for api v2 yet.

@omkelderman
Copy link

that it seems like it's not possible to autorize for api v2 yet

It is totally possible tho, read up about laravel pasport oauth2 and look into lazer sourecode how the endpoints are called (just dont use the lazer client-id/secret, peppy has mentioned multiple times on the dev discord he doesnt want ppl to do that). Also as we speak there is work being done in osu-web to get proper scopes going

@grumd
Copy link

grumd commented Nov 28, 2018

@omkelderman huh that's actually what I've ended up doing after spending 3 hours reading osu-web code lol. I'll look up how lazer is calling the endpoints though! That's a good hint, thanks!

Can you link the dev discord btw?

@grumd
Copy link

grumd commented Nov 28, 2018

@omkelderman Also, you seem knowledgeable in this topic, can you help with this?
I was able to create a client using /oauth/clients, then I was able to create a token using /oauth/token with 'grant_type': 'client_credentials', but the Bearer token I received doesn't let me use any v2 endpoints, they simply return { "authentication": "basic" } even when I send an appropriate header Authorization: Bearer .
I couldn't really authenticate because of this. I'll try looking at lazer code though.

@grumd
Copy link

grumd commented Nov 28, 2018

Ok so it seems that not all types of tokens are enabled for api v2. Only grant_type of authorization_code and password seem to work. For using password you also need a special type of client and it seems like you can't create one yourself. Bummer, it doesn't seem like it's possible to use machine-to-machine authorization for api v2 yet.

@jxu
Copy link

jxu commented Nov 28, 2018

@grumd
Copy link

grumd commented Nov 28, 2018

Yeah I already got there, thanks :D

@omkelderman
Copy link

@grumd see my comments on #227
tldr you're suppose to create a "personal access token" but I couldnt get that to work, so I used the oauth client (which you already seem to have) set it to a localhost redirect url, went through the auth flow with my own osu account and got an access token and used that as Bearer token

@jxu
Copy link

jxu commented Jul 29, 2019

@peppy any plans to implement this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants