the browser-facing portion of osu!
at master 248 lines 9.4 kB view raw view rendered
1## Notification 2```json 3{ 4 "id": 1, 5 "name": "channel_message", 6 "created_at": "2019-04-24T07:12:43+00:00", 7 "object_type": "channel", 8 "object_id": 1, 9 "source_user_id": 1, 10 "is_read": true, 11 "details": { 12 "username": "someone", 13 ... 14 } 15} 16``` 17 18Represents a notification object. 19 20Field | Type | Description 21---------------- | ----------------------- | ------------------------------------------------------------------------ 22id | integer | | 23name | string | Name of the event 24created_at | [Timestamp](#timestamp) | ISO 8601 date 25object_type | string | | 26object_id | integer | | 27source_user_id | integer? | | 28is_read | boolean | | 29details | object | `message_id` of last known message (only returned in presence responses) 30 31### Event Names 32 33Name | Description 34------------------------------------------------------------------------------ | ------------------------------------------------------------------- 35[beatmapset_discussion_lock](#notification-beatmapset_discussion_lock) | Discussion on beatmap has been locked 36[beatmapset_discussion_post_new](#notification-beatmapset_discussion_post_new) | New discussion post on beatmap 37[beatmapset_discussion_unlock](#notification-beatmapset_discussion_unlock) | Discussion on beatmap has been unlocked 38[beatmapset_disqualify](#notification-beatmapset_disqualify) | Beatmap was disqualified 39[beatmapset_love](#notification-beatmapset_love) | Beatmap was promoted to loved 40[beatmapset_nominate](#notification-beatmapset_nominate) | Beatmap was nominated 41[beatmapset_qualify](#notification-beatmapset_qualify) | Beatmap has gained enough nominations and entered the ranking queue 42[beatmapset_remove_from_loved](#notification-beatmapset_remove_from_loved) | Beatmap was removed from Loved 43[beatmapset_reset_nominations](#notification-beatmapset_reset_nominations) | Nomination of beatmap was reset 44[channel_message](#notification-channel_message) | Someone sent chat message 45[forum_topic_reply](#notification-forum_topic_reply) | Someone replied on forum topic 46 47<div id="notification-beatmapset_discussion_lock" data-unique="notification-beatmapset_discussion_lock"></div> 48 49#### `beatmapset_discussion_lock` 50 51Field | Type | Description 52-------------- | ------- | -------------------------- 53object_id | integer | Beatmapset id 54object_type | string | `beatmapset` 55source_user_id | integer | User who locked discussion 56 57Details object: 58 59Field | Type | Description 60--------- | ------ | ---------------------------- 61cover_url | string | Beatmap cover 62title | string | Beatmap title 63username | string | Username of `source_user_id` 64 65<div id="notification-beatmapset_discussion_post_new" data-unique="notification-beatmapset_discussion_post_new"></div> 66 67#### `beatmapset_discussion_post_new` 68 69Field | Type | Description 70-------------- | ------- | ----------------------------- 71object_id | integer | Beatmapset id 72object_type | string | `beatmapset` 73source_user_id | integer | Poster of the discussion 74 75Details object: 76 77Field | Type | Description 78------------- | -------- | ------------------------------ 79title | string | Beatmap title 80cover_url | string | Beatmap cover 81discussion_id | integer | | 82post_id | integer | | 83beatmap_id | integer? | `null` if posted to general all 84username | string | Username of `source_user_id` 85 86<div id="notification-beatmapset_discussion_unlock" data-unique="notification-beatmapset_discussion_unlock"></div> 87 88#### `beatmapset_discussion_unlock` 89 90Field | Type | Description 91-------------- | ------- | ---------------------------- 92object_id | integer | Beatmapset id 93object_type | string | `beatmapset` 94source_user_id | integer | User who unlocked discussion 95 96Details object: 97 98Field | Type | Description 99--------- | ------ | ---------------------------- 100title | string | Beatmap title 101cover_url | string | Beatmap cover 102username | string | Username of `source_user_id` 103 104<div id="notification-beatmapset_disqualify" data-unique="notification-beatmapset_disqualify"></div> 105 106#### `beatmapset_disqualify` 107 108Field | Type | Description 109-------------- | ------- | -------------------------------- 110object_id | integer | Beatmapset id 111object_type | string | `beatmapset` 112source_user_id | integer | User who disqualified beatmapset 113 114Details object: 115 116Field | Type | Description 117--------- | ------ | ---------------------------- 118title | string | Beatmap title 119cover_url | string | Beatmap cover 120username | string | Username of `source_user_id` 121 122 123<div id="notification-beatmapset_love" data-unique="notification-beatmapset_love"></div> 124 125#### `beatmapset_love` 126 127Field | Type | Description 128-------------- | ------- | ------------------------------------- 129object_id | integer | Beatmapset id 130object_type | string | `beatmapset` 131source_user_id | integer | User who promoted beatmapset to loved 132 133Details object: 134 135Field | Type | Description 136--------- | ------ | ---------------------------- 137title | string | Beatmap title 138cover_url | string | Beatmap cover 139username | string | Username of `source_user_id` 140 141<div id="notification-beatmapset_nominate" data-unique="notification-beatmapset_nominate"></div> 142 143#### `beatmapset_nominate` 144 145Field | Type | Description 146-------------- | ------- | ----------------------------- 147object_id | integer | Beatmapset id 148object_type | string | `beatmapset` 149source_user_id | integer | User who nominated beatmapset 150 151Details object: 152 153Field | Type | Description 154--------- | ------ | ---------------------------- 155title | string | Beatmap title 156cover_url | string | Beatmap cover 157username | string | Username of `source_user_id` 158 159<div id="notification-beatmapset_qualify" data-unique="notification-beatmapset_qualify"></div> 160 161#### `beatmapset_qualify` 162 163Field | Type | Description 164-------------- | ------- | ------------------------------------------------------- 165object_id | integer | Beatmapset id 166object_type | string | `beatmapset` 167source_user_id | integer | User whom beatmapset nomination triggered qualification 168 169Details object: 170 171Field | Type | Description 172--------- | ------ | ---------------------------- 173title | string | Beatmap title 174cover_url | string | Beatmap cover 175username | string | Username of `source_user_id` 176 177<div id="notification-beatmapset_remove_from_loved" data-unique="notification-beatmapset_remove_from_loved"></div> 178 179#### `beatmapset_remove_from_loved` 180 181Field | Type | Description 182-------------- | ------- | -------------------------------------- 183object_id | integer | Beatmapset id 184object_type | string | `beatmapset` 185source_user_id | integer | User who removed beatmapset from Loved 186 187Details object: 188 189Field | Type | Description 190--------- | ------ | ---------------------------- 191title | string | Beatmap title 192cover_url | string | Beatmap cover 193username | string | Username of `source_user_id` 194 195<div id="notification-beatmapset_reset_nominations" data-unique="notification-beatmapset_reset_nominations"></div> 196 197#### `beatmapset_reset_nominations` 198 199Field | Type | Description 200-------------- | ------- | ----------------------------------- 201object_id | integer | Beatmapset id 202object_type | string | `beatmapset` 203source_user_id | integer | User who triggered nomination reset 204 205Details object: 206 207Field | Type | Description 208--------- | ------ | ---------------------------- 209title | string | Beatmap title 210cover_url | string | Beatmap cover 211username | string | Username of `source_user_id` 212 213<div id="notification-channel_message" data-unique="notification-channel_message"></div> 214 215#### `channel_message` 216 217Field | Type | Description 218-------------- | ------- | ----------------------- 219object_id | integer | Channel id 220object_type | string | `channel` 221source_user_id | integer | User who posted message 222 223Details object: 224 225Field | Type | Description 226--------- | ------ | --------------------------------------------------------------------------------- 227title | string | Up to 36 characters of the message (ends with `...` when exceeding 36 characters) 228cover_url | string | Avatar of `source_user_id` 229username | string | Username of `source_user_id` 230 231<div id="notification-forum_topic_reply" data-unique="notification-forum_topic_reply"></div> 232 233#### `forum_topic_reply` 234 235Field | Type | Description 236-------------- | ------- | ----------------------- 237object_id | integer | Topic id 238object_type | string | `forum_topic` 239source_user_id | integer | User who posted message 240 241Details object: 242 243Field | Type | Description 244--------- | ------- | ---------------------------- 245title | string | Title of the replied topic 246cover_url | string | Topic cover 247post_id | integer | Post id 248username | string? | Username of `source_user_id`