-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount.proto
56 lines (49 loc) · 1.39 KB
/
account.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// B站开放接口 - 用户管理 bilibili-webapp
syntax = "proto3";
package member.bilibili.com ;
import "google/api/annotations.proto";
option go_package = "github.com/dev-openapi/bilibili-webapp";
service AccountService {
// 获取用户公开信息 https://openhome.bilibili.com/doc/4/feb66f99-7d87-c206-00e7-d84164cd701c
rpc GetAccountInfo(GetAccountInfoReq) returns (GetAccountInfoRes) {
option (google.api.http) = {
get: "/arcopen/fn/user/account/info",
};
}
// 查询用户已授权权限列表 https://openhome.bilibili.com/doc/4/08f935c5-29f1-e646-85a3-0b11c2830558
rpc GetAccountScopes(GetAccountScopesReq) returns (GetAccountScopesRes) {
option (google.api.http) = {
get: "/arcopen/fn/user/account/scopes",
body: "*",
};
}
}
message GetAccountInfoReq {
string client_id = 1;
string access_token = 2;
}
message GetAccountInfoRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
message Data {
string name = 1;
string face = 2;
string openid = 3;
}
Data data = 10;
}
message GetAccountScopesReq {
string client_id = 1;
string access_token = 2;
}
message GetAccountScopesRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
message Data {
string openid = 1;
repeated string scopes = 2;
}
Data data = 10;
}