osu-api icon indicating copy to clipboard operation
osu-api copied to clipboard

Get beatmap data by hash

Open Z1ni opened this issue 11 years ago • 5 comments

get_beatmaps works with beatmapset_id and beatmap_id, but why can't we request data with the beatmap hash? osu! replays contain only beatmap hashes, so we have no way to get beatmap information of replays.

Z1ni avatar Dec 07 '14 23:12 Z1ni

Can you comment with an example URL? I'm curious to have a look. (I'm not an osu! dev or anything.)

albinohat avatar Dec 19 '14 04:12 albinohat

You mean an example request? One could be https://osu.ppy.sh/api/get_beatmaps?k=api_key&h=065005a514e1f08762c53f1b116b4d66, if we would have (h)ash parameter Which then would return data for https://osu.ppy.sh/b/407624

Z1ni avatar Dec 19 '14 14:12 Z1ni

it's possible if you have captured and analyzed packets sent by osu! client when you click on a beatmap (loading leaderboard) also you can try this - http://wa.vg/osuapi/beatmap.php?md5=a5b99395a42bd55bc5eb1d2411cbdf8b

which returns {"approved":"1","approved_date":"2007-10-07 01:46:31","last_update":"0000-00-00 00:00:00","artist":"Kenji Ninuma","beatmap_id":"75","beatmapset_id":"1","bpm":"119.999","creator":"peppy","difficultyrating":"2.2918","diff_size":"4","diff_overall":"6","diff_approach":"6","diff_drain":"6","hit_length":"108","source":"","title":"DISCO PRINCE","total_length":"141","version":"Normal","mode":"0","md5":"a5b99395a42bd55bc5eb1d2411cbdf8b"}

iebb avatar Dec 22 '14 03:12 iebb

Yeah, I know it's possible with undocumented osu! API (I've done that) and some other external APIs, but it would be nice to have the official API support. Using the undocumented API just feels kinda wrong and one cannot guarantee that the external APIs are up to date.

Z1ni avatar Dec 22 '14 03:12 Z1ni

Documented. https://github.com/peppy/osu-api/wiki/Home/_compare/085a28214adacc82b27c931f913b747b9a67c31f...34add36a6c494fbf199aae85ba3ca8a715a2376d

thehowl avatar Aug 07 '15 10:08 thehowl