interface.md 1.4 KB

登录

返回值接口约定


第一个字段:result,第二个字段:token


result: 'token time out'

result: 'detected new device, please login',

result: 'wrong account or password',

result: 'illegal input',

result: 'illegal method, please use post',

result: 'login successfully', token:'xxxxxx'

请求接口约定(均使用POST)


接口链接:'account/login'

username(选填)

password(选填)

token(必填,若客户端无token,则传输字符串'token'来表示无token)

登出

返回值接口约定


第一个字段:result


result: 'logout successfully',

请求接口约定(均使用POST)


接口链接:'account/logout'

注册

返回值接口约定


第一个字段:result


result: 'reg successfully',

result: 'illegal input',

result: 'illegal method, please use post',

请求接口约定(均使用POST)


接口链接:'account/register'

username(必填)

password(必填)

password2(必填)

编辑用户资料

返回值接口约定


第一个字段:result


result: 'You do not have permission to do this',

result: 'edit successfully',

result: 'illegal input',

result: 'illegal method, please use post',

请求接口约定(均使用POST)


接口链接:'account/profile/(username)'

bio(选填)

avatar(选填)

phone(选填)