Notifications

Overview

Notifications are short bits of information about a certain action or process that are important to the user. There are multiple types of notifications users can receive.



Type Description Connected Data Example Wording
0 System Message notificationData
1 New Review connectedUser, connectedSong [user] reviewed your chart [title]
2 New SpinPlay connectedUser, connectedSong [user] added a SpinPlay to your chart [title]
3 Received Card connectedCard You've received the profile card [title]

Get Notifications

Returns all notifications of the connected user.

Method GET
Endpoint /connect/getNotifications
Query Parameters (string) connectToken


Output Body (Success)
{
  "version": 1,
  "status": 200,
  "data": [
    {
      "id": 36,
      "user": {
        "id": 1,
        "username": "taw.moe",
        "isVerified": null,
        "isPatreon": null,
        "pronouns": null,
        "avatar": "http:\/\/localhost\/www\/spinshare\/server\/public\/uploads\/\\avatar\/\\5f86d761933e1.png"
      },
      "notificationType": 0,
      "notificationData": "Lorem Ipsum dolor sit amet",
      "connectedSong": null,
      "connectedUser": null,
      "connectedCard": null
    },
    {
      "id": 37,
      "user": {
        "id": 1,
        "username": "taw.moe",
        "isVerified": null,
        "isPatreon": null,
        "pronouns": null,
        "avatar": "http:\/\/localhost\/www\/spinshare\/server\/public\/uploads\/\\avatar\/\\5f86d761933e1.png"
      },
      "notificationType": 1,
      "notificationData": "",
      "connectedSong": {
        "id": 2,
        "title": "Bubble Tea",
        "subtitle": "",
        "artist": "dark cat",
        "charter": "CdNDouglas",
        "uploader": 1,
        "fileReference": "spinshare_5f86d7d85eee6",
        "tags": [
          ""
        ],
        "views": 50,
        "downloads": 9,
        "isExplicit": false,
        "publicationStatus": 0,
        "hasEasyDifficulty": false,
        "hasNormalDifficulty": false,
        "hasHardDifficulty": false,
        "hasExtremeDifficulty": true,
        "hasXDDifficulty": false,
        "easyDifficulty": 0,
        "normalDifficulty": 0,
        "hardDifficulty": 0,
        "expertDifficulty": 22,
        "XDDifficulty": 0,
        "uploadDate": {
          "date": "2020-10-14 12:50:00.000000",
          "timezone_type": 3,
          "timezone": "Europe\/Berlin"
        },
        "updateDate": null,
        "updateHash": "7c55b7e2cfba50b06d93c2f076dc7c72",
        "description": null
      },
      "connectedUser": {
        "id": 2,
        "username": "gaben",
        "isVerified": null,
        "isPatreon": null,
        "pronouns": "he\/him",
        "avatar": "http:\/\/localhost\/www\/spinshare\/server\/public\/uploads\/\\avatar\/\\"
      },
      "connectedCard": null
    },
    {
      "id": 38,
      "user": {
        "id": 1,
        "username": "taw.moe",
        "isVerified": null,
        "isPatreon": null,
        "pronouns": null,
        "avatar": "http:\/\/localhost\/www\/spinshare\/server\/public\/uploads\/\\avatar\/\\5f86d761933e1.png"
      },
      "notificationType": 2,
      "notificationData": "",
      "connectedSong": {
        "id": 2,
        "title": "Bubble Tea",
        "subtitle": "",
        "artist": "dark cat",
        "charter": "CdNDouglas",
        "uploader": 1,
        "fileReference": "spinshare_5f86d7d85eee6",
        "tags": [
          ""
        ],
        "views": 50,
        "downloads": 9,
        "isExplicit": false,
        "publicationStatus": 0,
        "hasEasyDifficulty": false,
        "hasNormalDifficulty": false,
        "hasHardDifficulty": false,
        "hasExtremeDifficulty": true,
        "hasXDDifficulty": false,
        "easyDifficulty": 0,
        "normalDifficulty": 0,
        "hardDifficulty": 0,
        "expertDifficulty": 22,
        "XDDifficulty": 0,
        "uploadDate": {
          "date": "2020-10-14 12:50:00.000000",
          "timezone_type": 3,
          "timezone": "Europe\/Berlin"
        },
        "updateDate": null,
        "updateHash": "7c55b7e2cfba50b06d93c2f076dc7c72",
        "description": null
      },
      "connectedUser": {
        "id": 2,
        "username": "gaben",
        "isVerified": null,
        "isPatreon": null,
        "pronouns": "he\/him",
        "avatar": "http:\/\/localhost\/www\/spinshare\/server\/public\/uploads\/\\avatar\/\\"
      },
      "connectedCard": null
    },
    {
      "id": 39,
      "user": {
        "id": 1,
        "username": "taw.moe",
        "isVerified": null,
        "isPatreon": null,
        "pronouns": null,
        "avatar": "http:\/\/localhost\/www\/spinshare\/server\/public\/uploads\/\\avatar\/\\5f86d761933e1.png"
      },
      "notificationType": 3,
      "notificationData": "",
      "connectedSong": null,
      "connectedUser": null,
      "connectedCard": {
        "id": 1,
        "title": "The Way Album",
        "description": "Test Lorem Ipsum",
        "icon": "http:\/\/localhost\/www\/spinshare\/server\/public\/uploads\/\\card\/\\card_d8386f6a40166202b34e1d50730882bb.png"
      }
    }
  ]
}


Responses

Code Explaination
200 Successful response of notifications.
422 Some parameters were missing.
403 Your connectToken is missing or wrong.

Clear Notification

Clears a notification of the connected user.



Method GET
Endpoint /connect/clearNotification
Query Parameters (string) connectToken
(int) notificationID


Responses

Code Explaination
200 The notification was cleared.
404 The notification did not exist.
422 Some parameters were missing.
403 Your connectToken is missing or wrong.

Clear All Notifications

Clears all notifications of the connected user.



Method GET
Endpoint /connect/clearAllNotifications
Query Parameters (string) connectToken


Responses

Code Explaination
200 The notifications were cleared.
422 Some parameters were missing.
403 Your connectToken is missing or wrong.