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

Reference of v4 user best30

TheSnowfield edited this page May 31, 2021 · 7 revisions
arguments description optional
user user name or 9-digit user code YES, while passing usercode
usercode 9-digit user code YES, while passing user
overflow overflow count YES

Explain

Search and calculate user best30 table and recent 10 average.
The overflow option means api can return more scores which rating below the best30 minimum.

Return data

format follows the original arcapi

  • Automatically calculate the score rating and place in rating
  • recent10_avg will be zero when user ptt was hidden (also the star is turning to grayscale)
  • The length of best30_list may be less than 30 (usually happens on the new players)
  • The length of best30_overflow may less than the required count.
{
    "status": 0,
    "content": {
        "best30_avg": 0.0000,
        "recent10_avg": 0.0000,
        "best30_list": [
            {
                "song_id": "grievouslady",
                "difficulty": 2,
                "score": 0,
                "shiny_perfect_count": 0,
                "perfect_count": 0,
                "near_count": 0,
                "miss_count": 0,
                "health": 0,
                "modifier": 0,
                "time_played": 114514145141,
                "best_clear_type": 0,
                "clear_type": 0,
                "character": 0,
                "is_skill_sealed": false,
                "is_char_uncapped": false,
                "rating": 0.0000
            },
            // more data....
        ],
        "best30_overflow": [
            {
                "song_id": "ifi",
                "difficulty": 2,
                "score": 0,
                "shiny_perfect_count": 0,
                "perfect_count": 0,
                "near_count": 0,
                "miss_count": 0,
                "health": 0,
                "modifier": 0,
                "time_played": 114514145141,
                "best_clear_type": 0,
                "clear_type": 0,
                "character": 0,
                "is_skill_sealed": false,
                "is_char_uncapped": false,
                "rating": 0.0000
            },
            // more data....
        ]
    }
}

Error status

status description
0 everything is OK
-1 invalid username or usercode
-2 invalid usercode
-3 internal error occurred
-4 user not found
-5 too many users
-6 internal error occurred
-7 allocate an arc account failed
-8 clear friend list failed
-9 add friend failed
-10 internal error occurred
-11 not played yet
-12 internal error occurred
-13 internal error occurred
-14 internal error occurred
-15 internal error occurred
-16 querying best30 failed
-17 internal error occurred
-18 querying best30 failed
-19 internal error occurred
-233 unknown error occurred
Clone this wiki locally