Users

设置用户的代码配置

PUT
设置用户的代码配置 ( 指用户在编辑器中可以修改的设置 ) , 如代码补全等.

Path parameters

handlestringRequired

文件中的 _id 或者 slug.

Request

This endpoint expects an object.
liveCompletion
booleanOptional
控制代码自动补全提示是否出现, 默认值是 true
behaviors
booleanOptional
控制括号, 引号是否自动补齐, 默认值是 false
language
stringOptional
控制个人账号(学生账号无效)使用的语言, 目前仅支持 python, javascript, cpp, lua, coffeescript

Response

This endpoint returns an object
_id
stringOptional
email
stringOptional
name
stringOptional
slug
stringOptional
role
stringOptional

通常这是指"teacher"(“老师”)或者"student"(“学生”)

stats
objectOptional
oAuthIdentities
list of objectsOptional
subscription
objectOptional
license
objectOptional
PUT
1curl -X PUT https://koudashijie.com/api/users/:handle/ace-config \
2 -H "Content-Type: application/json" \
3 -u "<username>:<password>" \
4 -d '{}'
200
Updated
1{
2 "_id": "string",
3 "email": "string",
4 "name": "string",
5 "slug": "string",
6 "role": "string",
7 "stats": {
8 "gamesCompleted": 1,
9 "concepts": {
10 "string": 1
11 },
12 "playTime": 1
13 },
14 "oAuthIdentities": [
15 {
16 "provider": "string",
17 "id": "string"
18 }
19 ],
20 "subscription": {
21 "ends": "string",
22 "active": true
23 },
24 "license": {
25 "ends": "string",
26 "active": true
27 }
28}