Skip to content
This repository has been archived by the owner on Jul 5, 2021. It is now read-only.

Reference of v4 song random

TheSnowfield edited this page Apr 23, 2021 · 1 revision
arguments description optional
start range of start YES when end is not passed in
end range of end YES

Explain

Roll a song from a given difficulty range.

Return data

  • The default range is 2 to 23.
    For easier storage and higher compatibility,
    We make the song rating table from

    1 2 3 4 5 6 7 8 9 9+ 10 10+ 11

    expanded to

    1 1+ 2 2+ 3 3+ 4 4+ 5 5+ 6 6+ 7 7+ 8 8+ 9 9+ 10 10+ 11 11+

    So the algorithm is (ratingNumber * 2) + (ratingPlus ? 1 : 0)
    As you can see, now the range is 2 to 23.

  • We removed the full song info output feature in this version.
    Make it clean and dry. If you want to get the song info in the same request, Please reference the batch api.

{
    "status": 0,
    "content": {
        "id": "ifi",
        "rating_class": 2
    }
}

Error status

status description
0 everything is OK
-1 invalid range of start
-2 invalid range of end
-3 internal error
-233 unknown error occurred
Clone this wiki locally