-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanthology.proto
151 lines (136 loc) · 3.83 KB
/
anthology.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// B站开放接口 - 文集管理 bilibili-webapp
syntax = "proto3";
package member.bilibili.com ;
import "google/api/annotations.proto";
import "bilibili-webapp/common.proto";
option go_package = "github.com/dev-openapi/bilibili-webapp";
service AnthologyService {
// 文集提交 https://openhome.bilibili.com/doc/4/728b35c7-21f9-d15e-6f0e-5e39c6647903
rpc AddAnthology(AddAnthologyReq) returns (AddAnthologyRes) {
option (google.api.http) = {
post: "/arcopen/fn/article/anthology/add",
body: "body,form",
};
}
// 文集信息编辑 https://openhome.bilibili.com/doc/4/0e2f82f8-8b16-2927-0546-ac1a24871501
rpc EditAnthology(EditAnthologyReq) returns (EditAnthologyRes) {
option (google.api.http) = {
post: "/arcopen/fn/article/anthology/edit",
body: "body,form",
};
}
// 文集下文章列表修改 https://openhome.bilibili.com/doc/4/b20487b7-471b-0717-b3b6-e65dd8a5263d
rpc EditArticleBelong(EditArticleBelongReq) returns (EditArticleBelongRes) {
option (google.api.http) = {
post: "/arcopen/fn/article/belong",
body: "body,form",
};
}
// 文集删除 https://openhome.bilibili.com/doc/4/93289fec-1521-1f3f-c3ec-78108b4c7859
rpc DeleteAnthology(DeleteAnthologyReq) returns (DeleteAnthologyRes) {
option (google.api.http) = {
post: "/arcopen/fn/article/anthology/delete",
body: "body,form",
};
}
// 查看文集列表 https://openhome.bilibili.com/doc/4/1caef1c1-0576-91e3-00ed-c287e9866d7e
rpc BatchGetAnthologies(BatchGetAnthologiesReq) returns (BatchGetAnthologiesRes) {
option (google.api.http) = {
get: "/arcopen/fn/article/anthology/list",
};
}
// 查看文集详情 https://openhome.bilibili.com/doc/4/78228e26-1c25-5b65-e107-a08dabf45850
rpc GetAnthology(GetAnthologyReq) returns (GetAnthologyRes) {
option (google.api.http) = {
get: "/arcopen/fn/article/anthology/detail",
body: "body,form",
};
}
}
message AnthologyDetail {
int64 list_id = 1;
string name = 2;
string image_url = 3;
string summary = 4;
}
message AddAnthologyReq {
string client_id = 1;
string access_token = 2;
AnthologyDetail body = 10;
}
message AddAnthologyRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
AnthologyDetail data = 10;
}
message EditAnthologyReq {
string client_id = 1;
string access_token = 2;
AnthologyDetail body = 10;
}
message EditAnthologyRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
AnthologyData data = 10;
}
message EditArticleBelongReq {
string client_id = 1;
string access_token = 2;
message Body {
int64 list_id = 1;
string article_ids = 2;
}
Body body = 10;
}
message EditArticleBelongRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
}
message DeleteAnthologyReq {
string client_id = 1;
string access_token = 2;
message Body {
int64 id = 1;
}
Body body = 10;
}
message DeleteAnthologyRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
}
message BatchGetAnthologiesReq {
string client_id = 1;
string access_token = 2;
}
message BatchGetAnthologiesRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
message Data {
int64 total = 1;
repeated AnthologyData list = 2;
}
Data data = 10;
}
message GetAnthologyReq {
string client_id = 1;
string access_token = 2;
message Body {
int64 id = 1;
}
Body body = 10;
}
message GetAnthologyRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
message Data {
AnthologyData list = 1;
repeated ArticleData articles = 2;
}
repeated Data data = 10;
}