luogu-api-docs

用户 API

获取用户

请求 GET /user/:uid
响应主体 application/json (LentilleDataResponse<UserData>)

根据 UID 或名字搜索用户

请求 GET /api/user/search
参数 { keyword: string }
响应主体 application/json ({ users: [UserSummary | null] })

获取练习情况

请求 GET /user/:uid/practice
响应主体 application/json (LentilleDataResponse<UserPracticeData>)

获取历史等级分

请求 GET /api/rating/elo
参数 { user: number; page?: number; limit?: number }
响应主体 application/json ({ records: List<EloRating> })

列出关注

请求 GET /api/user/followings
参数 { user: number; page?: number }
响应主体 application/json ({ users: List<User & UserStats> })

列出粉丝

请求 GET /api/user/followers
参数 { user: number; page?: number }
响应主体 application/json ({ users: List<User & UserStats> })

获取黑名单

请求 GET /api/user/blacklist
参数 { user: number; page?: number }
响应主体 application/json ({ users: List<User & UserStats> })

获取账号设置

请求 GET /user/setting
响应主体 application/json (LentilleDataResponse<UserAccountsData>)

获取偏好设置

请求 GET /user/setting/preference
响应主体 application/json (LentilleDataResponse<UserPreferencesData>)

更新偏好设置

请求 POST /user/setting/preference/update
请求主体 application/json (UserPreferences)
响应主体 application/json ({ setting: UserPreferences })

获取奖项认证设置

请求 GET /user/setting/prize
响应主体 application/json (LentilleDataResponse<UserPrizeSettingsData>)

获取安全设置

请求 GET /user/setting/security
响应主体 application/json (LentilleDataResponse<UserSecuritySettingsData>)

更新签名

请求 POST /api/user/updateSlogan
请求主体 application/json ({ slogan: string })
响应主体 application/json ({})

更新介绍

请求 POST /api/user/updateIntroduction
请求主体 application/json ({ introduction: string })
响应主体 application/json ({})

更新封面

请求 POST /api/user/updateHeaderImage
请求主体 application/json ({ imageID: string | null })
响应主体 application/json ({})

绑定 RemoteJudge

请求 POST /api/user/bindVjudgeAccount
请求主体 application/json (BindRemoteJudgeAccountRequest)
响应主体 application/json ({})

解除绑定 RemoteJudge

请求 POST /api/user/unbindVjudgeAccount
请求主体 application/json ({ oj: string })
响应主体 application/json ({})

绑定 OpenID

: 重定向到对应的认证页面。

请求 GET /openid/:id/bind

解绑 OpenID

请求 POST /api/user/unbindOpenId/:id
响应主体 application/json ({})