ppy / osu-api

Public API for accessing osu! related data.
318 stars 16 forks source link

Real-time stream of new scores #160

Open ekgame opened 7 years ago

ekgame commented 7 years ago

This an API endpoint proposal for getting real-time updates about new user scores.


Real time score stream

URL

Uses WebSockets for real-time updates.

ws://osu.ppy.sh/api/score_stream

Description

Provides a real-time stream of new scores. Only finished plays of ranked maps.

Potentional use cases

Parameters

WebSocket frame

Mostly the same as /api/get_scores response, with a notable addition of map_rank.

{
    "user_id" : "12345",
    "username": "Username",

    "score"       : "1234567",
    "maxcombo"    : "321",
    "perfect"     : "0",  // 1 = maximum combo of map reached, 0 otherwise
    "enabled_mods": "76", // bitwise flag representation of mods used. see reference
    "rank"        : "SH",

    "count300" : "300",
    "count100" : "50",
    "count50"  : "10",
    "countmiss": "1",
    "countkatu": "10",
    "countgeki": "50",

    "date"    : "2013-06-22 9:11:16",
    "pp"      : "123.456"
    "map_rank": "456"     // The global ranking in the map's scoreboard
}
Tillerino commented 7 years ago

Like the twitter stream API. Yes pls.

On Mon, Jan 30, 2017 at 3:10 PM ekgame notifications@github.com wrote:

This an API endpoint proposal for getting real-time updates about new user scores.

Real time score stream URL

Uses WebSockets for real-time updates.

ws://osu.ppy.sh/api/score_stream

Description

Provides a real-time stream of new scores. Only finished plays of ranked maps. Potentional use cases

  • Tracking new scores.
  • Analyzing trends in player activity.

Parameters

  • k - api key (required)

WebSocket frame

Mostly the same as /api/get_scores response, with a notable addition of map_rank.

{ "user_id" : "12345", "username": "Username",

"score"       : "1234567",
"maxcombo"    : "321",
"perfect"     : "0",  // 1 = maximum combo of map reached, 0 otherwise
"enabled_mods": "76", // bitwise flag representation of mods used. see reference
"rank"        : "SH",

"count300" : "300",
"count100" : "50",
"count50"  : "10",
"countmiss": "1",
"countkatu": "10",
"countgeki": "50",

"date"    : "2013-06-22 9:11:16",
"pp"      : "123.456"
"map_rank": "456"     // The global ranking in the map's scoreboard

}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ppy/osu-api/issues/160, or mute the thread https://github.com/notifications/unsubscribe-auth/ABL9ZYY0IjhVbKMr2vZZTxe80X2_MjPxks5rXe9HgaJpZM4LxcYG .

omkelderman commented 7 years ago

I can probably guess the answer: "when new web is done" xD

2017-02-03 20:18 GMT+01:00 Tillerino notifications@github.com:

Like the twitter stream API. Yes pls.

On Mon, Jan 30, 2017 at 3:10 PM ekgame notifications@github.com wrote:

This an API endpoint proposal for getting real-time updates about new user scores.

Real time score stream URL

Uses WebSockets for real-time updates.

ws://osu.ppy.sh/api/score_stream

Description

Provides a real-time stream of new scores. Only finished plays of ranked maps. Potentional use cases

  • Tracking new scores.
  • Analyzing trends in player activity.

Parameters

  • k - api key (required)

WebSocket frame

Mostly the same as /api/get_scores response, with a notable addition of map_rank.

{ "user_id" : "12345", "username": "Username",

"score" : "1234567", "maxcombo" : "321", "perfect" : "0", // 1 = maximum combo of map reached, 0 otherwise "enabled_mods": "76", // bitwise flag representation of mods used. see reference "rank" : "SH",

"count300" : "300", "count100" : "50", "count50" : "10", "countmiss": "1", "countkatu": "10", "countgeki": "50",

"date" : "2013-06-22 9:11:16", "pp" : "123.456" "map_rank": "456" // The global ranking in the map's scoreboard }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ppy/osu-api/issues/160, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABL9ZYY0IjhVbKMr2vZZTxe80X2_MjPxks5rXe9HgaJpZM4LxcYG .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ppy/osu-api/issues/160#issuecomment-277337012, or mute the thread https://github.com/notifications/unsubscribe-auth/ACbUYGOUPhqqJumaYa2yWT6vJv-iDKqcks5rY32cgaJpZM4LxcYG .

peppy commented 7 years ago

The API is already implemented there. If you feel like it, you're more than welcome to add a new endpoint and PR it.

IOExceptionOsu commented 6 years ago

What did you mean by the API is already implemented? Has it already been coded and is public-facing? I think this would be an extremely useful API.

christopher-dG commented 6 years ago

Bump, this would be super useful. Also a stream of beatmap events (I think there's an issue for something similar but I couldn't find it).

knht commented 5 years ago

Push! It'd make the life so so so much easier to add a reliable score tracking feature to an existing project. Right now it can't be done in real time and constantly polling at set intervals isn't good practice either.

praeludiumOrbis commented 4 years ago

Bump! Implementing this would help groups with the intentions of investigating potential cheaters a lot.

peppy commented 4 years ago

It's still on our radar.

aticie commented 3 years ago

Any updates on this?

I think this would release the heavy strain on requests because too many applications are polling scores every second in order to track player progresses.

peppy commented 3 years ago

No updates on this. It will come as part of (or after) a complete refactor of scoring which is in progress to get lazer up to par.

aticie commented 3 years ago

Thanks, do we have any eta or deadlines on that?

peppy commented 3 years ago

no

isaklovas commented 9 months ago

Any new updates or plans on this?

peppy commented 9 months ago

no