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

Real-time stream of new scores

Open ekgame opened this issue 8 years ago • 14 comments

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
}

ekgame avatar Jan 30 '17 14:01 ekgame

Like the twitter stream API. Yes pls.

On Mon, Jan 30, 2017 at 3:10 PM ekgame [email protected] 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 .

Tillerino avatar Feb 03 '17 19:02 Tillerino

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

2017-02-03 20:18 GMT+01:00 Tillerino [email protected]:

Like the twitter stream API. Yes pls.

On Mon, Jan 30, 2017 at 3:10 PM ekgame [email protected] 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 .

omkelderman avatar Feb 03 '17 20:02 omkelderman

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

peppy avatar Feb 04 '17 04:02 peppy

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.

IOExceptionOsu avatar Mar 05 '18 06:03 IOExceptionOsu

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).

christopher-dG avatar Sep 15 '18 03:09 christopher-dG

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.

knht avatar Nov 04 '18 23:11 knht

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

praeludiumOrbis avatar Sep 04 '20 06:09 praeludiumOrbis

It's still on our radar.

peppy avatar Sep 04 '20 08:09 peppy

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.

aticie avatar Apr 13 '21 14:04 aticie

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.

peppy avatar Apr 13 '21 14:04 peppy

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

aticie avatar Apr 13 '21 14:04 aticie

no

peppy avatar Apr 13 '21 14:04 peppy

Any new updates or plans on this?

isaklovas avatar Dec 28 '23 17:12 isaklovas

no

peppy avatar Dec 28 '23 17:12 peppy