diff --git a/doc/Role.py b/doc/Role.py index 3497d6a..550482c 100644 --- a/doc/Role.py +++ b/doc/Role.py @@ -5,20 +5,6 @@ import _common class Role(object): def __init__(self): - self.apis = [ - { - 'desc': '获取角色信息roleInfo', - 'group': 'Role', - 'url': 'webapp/index.php?c=Role&a=roleInfo', - 'params': [ - _common.ReqHead(), - ], - 'response': [ - _common.RspHead(), - _common.RoleInfo(), - ] - }, - ] self.apis_ = [ { 'desc': '获取角色信息roleInfo', diff --git a/doc/User.py b/doc/User.py new file mode 100644 index 0000000..5bd30bf --- /dev/null +++ b/doc/User.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +import _common + +class User(object): + + def __init__(self): + self.apis = [ + { + 'desc': '获取用户信息信息info', + 'group': 'User', + 'url': 'webapp/index.php?c=User&a=info', + 'params': [ + _common.ReqHead(), + ], + 'response': [ + _common.RspHead(), + ['info',_common.UserInfo(), '用户信息'] + ] + }, + ] diff --git a/doc/_common.py b/doc/_common.py index d62377f..27223d1 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -108,13 +108,27 @@ class RoleInfo(object): ['max_seasonScore', 0, '最高积分'], ] +class UserInfo(object): + + def __init__(self): + self.fields = [ + ['name', '', '用户名字'], + ['head_id', 0, '头像id'], + ['head_frame', 0, '头像框id'], + ['level', 0, '等级'], + ['exp', 0, '经验'], + ['gold', 0, '金币'], + ['diamond', 0, '钻石'], + ['hero_id', 0, '当前使用的英雄ID'], + ] + class RobotInfo(object): def __init__(self): self.fields = [ - ['account_id', 0, '机器人account_id'], - ['name', 0, '机器人名字'], - ['avatar_url', 0, '机器人头像'], + ['account_id', '', '机器人account_id'], + ['name', '', '机器人名字'], + ['avatar_url', '', '机器人头像'], ] class RobotMetaInfo(object):