API users - Lost-MSth/Arcaea-server GitHub Wiki

/users

/

GET

To get some users' information.

  • power required: 'select'
  • query:
    Key Allowed values
    query 'user_id', 'name', 'user_code'
    fuzzy_query 'user_id', 'name', 'user_code'
    sort 'user_id', 'name', 'user_code', 'join_date', 'rating_ptt', 'time_played', 'ticket', 'world_rank_score'
  • response data: list[dict]

POST

To register a new user.

  • power required: 'change'
  • request data: dict
    Key Type Optional
    name str
    password str
    email str
  • response data: dict

/<user_id>

GET

To get a user's information, just like /user/me.

  • power required: 'select', 'select_me'
  • response data: dict

PUT

To change a user's information.

  • power required: 'change'
  • request data: dict
    Key Type Optional
    name str Y
    password str Y
    email str Y
    user_code str Y
    ticket int Y
  • response data: dict

/<user_id>/b30

GET

To get a user's best30 scores.

  • power required: 'select', 'select_me'
  • response data: dict
    • data: list[dict]
    • b30_ptt: float

/<user_id>/best

GET

To get a user's best scores.

  • power required: 'select', 'select_me'
  • query:
    Key Allowed values
    query 'song_id', 'difficulty'
    fuzzy_query 'song_id'
    sort 'rating', 'difficulty', 'song_id', 'score', 'time_played'
  • response data: list[dict]

/<user_id>/r30

GET

To get a user's recent30 ratings and recent10 potential.

  • power required: 'select', 'select_me'
  • response data: dict
    • data: list[dict]
    • r10_ptt: float

/<user_id>/role

GET

To get a user's role and powers.

  • power required: 'select', 'select_me'
  • response data: dict
    • role: str
    • powers: list[str]

/<user_id>/rating

GET

To get a user's historical potential value records. The data are from the log database. The unit is days.

Experimental (Not stable)

  • power required: 'select', 'select_me'
  • query:
    Key Type Optional
    start_timestamp int Y if duration exists
    end_timestamp int Y if duration exists
    duration int Y if both start_timestamp and end_timestamp exist
  • response data: dict
    • data: list[dict]
      • time: int
      • rating_ptt: float
⚠️ **GitHub.com Fallback** ⚠️