game2005api/doc/User.py
aozhiwei 732713f6e5 1
2021-12-07 16:54:35 +08:00

101 lines
3.7 KiB
Python

# -*- coding: utf-8 -*-
import _common
class User(object):
def __init__(self):
self.apis = [
{
'name': 'login',
'desc': '登录',
'group': 'User',
'url': 'webapp/index.php?c=User&a=login',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['info',_common.UserInfo(), '用户信息']
]
},
{
'name': 'nameExists',
'desc': '名字是否已被用',
'group': 'User',
'url': 'webapp/index.php?c=User&a=nameExists',
'params': [
_common.ReqHead(),
['name', 0, '名字'],
['name_sign', '', '名字签名'],
],
'response': [
_common.RspHead(),
]
},
{
'name': 'activate',
'desc': '激活用户',
'group': 'User',
'url': 'webapp/index.php?c=User&a=activate',
'params': [
_common.ReqHead(),
['name', 0, '昵称'],
['name_sign', '', '名字签名'],
['sex', 0, '性别'],
['head_id', 0, '头像id'],
['head_frame', 0, '头像框'],
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'update',
'desc': '更新用户信息',
'group': 'User',
'url': 'webapp/index.php?c=User&a=update',
'params': [
_common.ReqHead(),
['sex', 0, '更新性别(可选参数,不传就不更新)'],
['head_id', 0, '更新头像(可选参数,不传就不更新)'],
['head_frame', 0, '更新头像框(可选参数,不传就不更新)'],
['hero_id', 0, '更新上阵英雄id(可选参数,不传就不更新)'],
['first_fight', 0, '更新首次战斗(可选参数,不传就不更新)']
],
'response': [
_common.RspHead(),
['property_chg', _common.PropertyChg(), '属性变更'],
]
},
{
'name': 'info',
'desc': '获取用户信息',
'group': 'User',
'url': 'webapp/index.php?c=User&a=info',
'params': [
_common.ReqHead(),
['target_id', '', '用户account_id(如果要获取自己的就传自己的account_id)']
],
'response': [
_common.RspHead(),
['info',_common.UserInfo(), '用户信息'],
]
},
{
'name': 'detailInfo',
'desc': '获取用户信息(详细)',
'group': 'User',
'url': 'webapp/index.php?c=User&a=detailInfo',
'params': [
_common.ReqHead(),
['target_id', '', '用户account_id(如果要获取自己的就传自己的account_id)']
],
'response': [
_common.RspHead(),
['info',_common.UserDetailInfo(), '用户信息(详细)'],
]
},
]