-
Notifications
You must be signed in to change notification settings - Fork 0
Survey API v1
Jinglei Ren edited this page Oct 5, 2017
·
17 revisions
All requests must contain HTTP header X-USR-TOKEN
to identify a specified user.
API responds HTTP code 403 if token doesn't existed or token is invalid.
{
"id": $,
"type": "single",
"commits": [
{
"id": $,
"title": STR,
"url": STR
}
...
]
}
{
"id": $,
"type": "single",
"commits": [
{
"id": $,
"title": STR,
"url": STR
}
...
],
"selected": STR,
"commitLabels": [
{
"commitId": STR,
"labelId": STR
}
...
]
}
{
"id": $,
"title": STR
}
返回下一个没有作答过的 Question,包含 Question Object
Response
{
"status": $,
"message": STR,
"data": QUESTION_OBJECT,
}
Payload
{
"selected": COMMIT_ID,
}
返回下一个没有加过标签的 Review,包含 Review Object
Response
{
"status": $,
"message": STR,
"data": REVIEW_OBJECT,
}
Payload
{
"reason": STR,
"commitLabels": [
{
"commitId": STR,
"labelId": STR
}
...
]
}
返回创建好的 label 信息
Payload
{
labelTitle: STR
}
Response
{
"status": $,
"message": STR,
"data": LABEL_OBJECT,
}
获取所有 Labels
Response
{
"status": $,
"message": STR,
"data": {
builtins: [LABEL_OBJECT, ...],
customised: [LABEL_OBJECT, ...],
}
}
{
"status": 0, // 可能的错误号或者 0
"message": '可能的错误信息',
"data": 返回的数据
}
© 2017 The Persper Foundation