-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.proto
183 lines (164 loc) · 4.2 KB
/
archive.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
// 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 ArchiveService {
// 查询单一视频稿件详情 https://openhome.bilibili.com/doc/4/d9554788-dcef-f139-6217-b487d41c3826
rpc GetArchive(GetArchiveReq) returns (GetArchiveRes) {
option (google.api.http) = {
get: "/arcopen/fn/archive/view",
};
}
// 查询用户视频稿件列表 https://openhome.bilibili.com/doc/4/a24030b7-6b8f-b36c-32d8-a4aae67fcc35
rpc BatchGetArchive(BatchGetArchiveReq) returns (BatchGetArchiveRes) {
option (google.api.http) = {
get: "/arcopen/fn/archive/viewlist",
};
}
// 视频稿件编辑 https://openhome.bilibili.com/doc/4/ddfbe54d-b4ab-340e-c698-933b9a3c619c
rpc EditArchive(EditArchiveReq) returns (EditArchiveRes) {
option (google.api.http) = {
post: "/arcopen/fn/archive/edit",
body: "body",
};
}
// 视频稿件删除 https://openhome.bilibili.com/doc/4/23d78390-4119-1e5f-2bbe-b45bd5cecdb0
rpc DeleteArchive(DeleteArchiveReq) returns (DeleteArchiveRes) {
option (google.api.http) = {
post: "/arcopen/fn/archive/delete",
body: "body",
};
}
// 获取分区
rpc GetArchiveTypeList(GetArchiveTypeListReq) returns (GetArchiveTypeListRes) {
option (google.api.http) = {
get: "/arcopen/fn/archive/type/list",
};
}
// 视频稿件提交
rpc AddArchive(AddArchiveReq) returns (AddArchiveRes) {
option (google.api.http) = {
post: "/arcopen/fn/archive/add-by-utoken",
body: "body",
};
}
}
message GetArchiveReq {
string client_id = 1;
string access_token = 2;
string resource_id = 3;
}
message GetArchiveRes {
int32 code = 1;
string message = 2;
ArchiveInfo data = 10;
}
message BatchGetArchiveReq {
string client_id = 1;
string access_token = 2;
int64 pn = 3;
int64 ps = 4;
string status = 5;
}
message BatchGetArchiveRes {
int32 code = 1;
string message = 2;
int32 ttle = 3;
message Data {
Page page = 1;
repeated ArchiveInfo list = 2;
}
Data data = 4;
}
message EditArchiveReq {
string client_id = 1;
string access_token = 2;
message Body {
string resource_id = 1;
string title = 2;
string cover = 3;
int64 tid = 4;
int32 no_reprint = 5;
string desc = 6;
}
Body body = 3;
}
message EditArchiveRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
message Data {
string resource_id = 1;
}
Data data = 4;
}
message DeleteArchiveReq {
string client_id = 1;
string access_token = 2;
message Body {
string resource_id = 1;
}
Body body = 3;
}
message DeleteArchiveRes {
int32 code = 1;
string message = 2;
int32 ttle = 3;
}
message VideoInfo {
int64 cid = 1;
string filename = 2;
int64 duration = 3;
string share_url = 4;
string iframe_url = 5;
}
message AdditInfo {
int32 state = 1;
string state_desc = 2;
string reject_reason = 3;
}
message ArchiveInfo {
string resource_id = 1;
string cover = 2;
int64 tid = 3;
int32 no_reprint = 4;
string desc = 5;
string tag = 6;
int32 copyright = 7;
int64 ctime = 8;
int64 ptime = 9;
VideoInfo video_info = 10;
AdditInfo addit_info = 11;
string title = 12;
}
message GetArchiveTypeListReq {
string client_id = 1;
string access_token = 2;
}
message ArchiveType {
int64 id = 1;
int64 parent = 2;
string name = 3;
string description = 4;
repeated ArchiveType children = 5;
}
message GetArchiveTypeListRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
repeated ArchiveType data = 10;
}
message AddArchiveReq {
string client_id = 1;
string access_token = 2;
string upload_token = 3;
ArchiveInfo body = 10;
}
message AddArchiveRes {
int32 code = 1;
string message = 2;
int32 ttl = 3;
ArchiveInfo data = 10;
}