cyperdark / osu-api-extended

Package for advanced work with "osu" api
MIT License
47 stars 16 forks source link

can't seem to get user.scores to work the way I want it too #12

Closed MorgenAnSpyrys closed 1 year ago

MorgenAnSpyrys commented 1 year ago

Hi there, this is probably just me being an ape but I'm trying to figure out how to fetch the entirety of a user's top100 scores. I set the limit for user.scores.category to 100 but it still only ever gives me 5 scores. image image Please let me know in what way I'm being hare-brained here. I originally wanted to DM you instead of opening an issue but you have DMs closed on both twitter and discord. Thanks :)

edit: i also tried using the offset parameter but that didn't work either, i feel like a complete ape for not being able to get it to work image

edit2: upon further investigation i haven't been able to get any params to work for this method. It also seems like a default limit of 5 is hard-coded somewhere I couldn't find (since the api defaults to 10). I assume this mystery code is also what is preventing any other params from applying, but I really have no clue. I have been able to temporarily get my code working by hardcoding my parameters into the url in category.js.

ok i'm stupid and i figured it out, closing

cyperdark commented 1 year ago

oops, i did mistake in documentation, thats how it should be

await v2.user.scores.category(user: number, type: 'recent' | 'best' | 'firsts' | 'pinned', obj: {
  include_fails?: string,
  mode?: string,
  limit?: number,
  offset?: string,
})
await v2.user.scores.category(user,  'recent', {
  include_fails: true,
  mode: 0,
  limit: 50,
  offset: 0,
})
cyperdark commented 1 year ago

hello?

MorgenAnSpyrys commented 1 year ago

Sorry I didn't notice you reopened the issue, as mentioned when I originally closed it I figured it out (it was the solution you posted) I just assumed it was down to me not being familiar with node (or js in general)

cyperdark commented 1 year ago

ah, i see, it's also my fault for mistakes in docs