File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6666 id: "用户id"
6767 name: "用户名"
6868 avatar_url: "头像URL"
69- avatar_id: 头像ID(数字 )
69+ avatar_id: 头像ID(整数 )
7070 phone: "手机号"
7171 email: "邮箱"
7272 coin: 金币数
@@ -96,4 +96,84 @@ message info {
9696 Data data = 2;
9797}
9898```
99+ :::
100+
101+ ## 获取用户信息
102+
103+ POST /v1/user/get-user
104+
105+ 请求头:
106+
107+ | 名称| 必须| 备注|
108+ | ---| ---| ---|
109+ | token| 是| 可以瞎写一个|
110+
111+ 请求体:
112+ ``` ProtoBuf
113+ id: "用户id"
114+ ```
115+ ::: details ProtoBuf数据结构
116+ ``` proto
117+ message get_user_send {
118+ string id = 2;
119+ }
120+ ```
121+ :::
122+
123+ 响应体:
124+ ``` ProtoBuf
125+ status {
126+ number: 123456
127+ code: 1
128+ msg: "success"
129+ }
130+ data {
131+ id: "用户ID"
132+ name: "用户名"
133+ unknown: 不知道干啥的
134+ avatar_url: "头像URL"
135+ avatar_id: 头像ID(整数)
136+ medal {
137+ order: 1
138+ text: "内测用户"
139+ id: 100
140+ }
141+ medal {
142+ order: 6
143+ text: "100000用户"
144+ id: 500
145+ }
146+ registered_time: "注册时间(YYYY-MM-DD hh:mm:ss"
147+ online_day: 在线时长(整数)
148+ continue_online_day: 连续在线时长(整数)
149+ vip_expired_time: unix时间戳
150+ }
151+ ```
152+ ::: details ProtoBuf数据结构
153+ ``` proto
154+ // 勋章信息
155+ message Medal_info {
156+ uint64 order = 1;
157+ string text = 2;
158+ uint64 id = 5;
159+ }
160+
161+ // 获取用户信息
162+ message get_user {
163+ Status status = 1; // 状态码
164+ Data data = 2; //数据
165+ message Data {
166+ string id = 1; // 用户id
167+ string name = 2; // 用户名
168+ uint64 unknown = 3; // 不知道干啥的
169+ string avatar_url = 4; //头像URL
170+ uint64 avatar_id = 5; // 头像ID
171+ repeated Medal_info medal = 6; // 勋章信息
172+ string registered_time = 7; // 注册时间,格式: YYYY-MM-DD hh:mm:ss
173+ uint64 online_day = 11; // 在线天数
174+ uint64 continue_online_day = 12; // 连续在线天数
175+ uint64 vip_expired_time = 14; // VIP过期时间(时间戳)
176+ }
177+ }
178+ ```
99179:::
You can’t perform that action at this time.
0 commit comments