Skip to content

Commit c885951

Browse files
committed
updatte archive api
1 parent d7e53a7 commit c885951

File tree

2 files changed

+141
-0
lines changed

2 files changed

+141
-0
lines changed

bilibili-webapp/account.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import "google/api/annotations.proto";
77
option go_package = "github.com/dev-openapi/bilibili-webapp";
88

99
service AccountService {
10+
// 获取用户公开信息 https://openhome.bilibili.com/doc/4/feb66f99-7d87-c206-00e7-d84164cd701c
1011
rpc GetAccountInfo(GetAccountInfoReq) returns (GetAccountInfoRes) {
1112
option (google.api.http) = {
1213
get: "/arcopen/fn/user/account/info",

bilibili-webapp/archive.proto

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
// B站开放接口 - 视频稿件管理 bilibili-webapp
2+
3+
syntax = "proto3";
4+
package member.bilibili.com ;
5+
import "google/api/annotations.proto";
6+
7+
option go_package = "github.com/dev-openapi/bilibili-webapp";
8+
9+
service ArchiveService {
10+
// 查询单一视频稿件详情 https://openhome.bilibili.com/doc/4/d9554788-dcef-f139-6217-b487d41c3826
11+
rpc GetArchive(GetArchiveReq) returns (GetArchiveRes) {
12+
option (google.api.http) = {
13+
get: "/arcopen/fn/archive/view",
14+
};
15+
}
16+
// 查询用户视频稿件列表 https://openhome.bilibili.com/doc/4/a24030b7-6b8f-b36c-32d8-a4aae67fcc35
17+
rpc BatchGetArchive(BatchGetArchiveReq) returns (BatchGetArchiveRes) {
18+
option (google.api.http) = {
19+
get: "/arcopen/fn/archive/viewlist",
20+
};
21+
}
22+
// 视频稿件编辑 https://openhome.bilibili.com/doc/4/ddfbe54d-b4ab-340e-c698-933b9a3c619c
23+
rpc EditArchive(EditArchiveReq) returns (EditArchiveRes) {
24+
option (google.api.http) = {
25+
post: "/arcopen/fn/archive/edit",
26+
body: "body",
27+
};
28+
}
29+
// 视频稿件删除 https://openhome.bilibili.com/doc/4/23d78390-4119-1e5f-2bbe-b45bd5cecdb0
30+
rpc DeleteArchive(DeleteArchiveReq) returns (DeleteArchiveRes) {
31+
option (google.api.http) = {
32+
post: "/arcopen/fn/archive/delete",
33+
body: "body",
34+
};
35+
}
36+
}
37+
38+
message GetArchiveReq {
39+
string client_id = 1;
40+
string access_token = 2;
41+
string resource_id = 3;
42+
}
43+
44+
message GetArchiveRes {
45+
int32 code = 1;
46+
string message = 2;
47+
ArchiveInfo data = 10;
48+
}
49+
50+
message BatchGetArchiveReq {
51+
string client_id = 1;
52+
string access_token = 2;
53+
int64 pn = 3;
54+
int64 ps = 4;
55+
string status = 5;
56+
}
57+
58+
message BatchGetArchiveRes {
59+
int32 code = 1;
60+
string message = 2;
61+
int32 ttle = 3;
62+
message Data {
63+
Page page = 1;
64+
repeated ArchiveInfo list = 2;
65+
}
66+
Data data = 4;
67+
}
68+
69+
message EditArchiveReq {
70+
string client_id = 1;
71+
string access_token = 2;
72+
message Body {
73+
string resource_id = 1;
74+
string title = 2;
75+
string cover = 3;
76+
int64 tid = 4;
77+
int32 no_reprint = 5;
78+
string desc = 6;
79+
}
80+
Body body = 3;
81+
}
82+
83+
message EditArchiveRes {
84+
int32 code = 1;
85+
string message = 2;
86+
int32 ttl = 3;
87+
message Data {
88+
string resource_id = 1;
89+
}
90+
Data data = 4;
91+
}
92+
93+
message DeleteArchiveReq {
94+
string client_id = 1;
95+
string access_token = 2;
96+
message Body {
97+
string resource_id = 1;
98+
}
99+
Body body = 3;
100+
}
101+
102+
message DeleteArchiveRes {
103+
int32 code = 1;
104+
string message = 2;
105+
int32 ttle = 3;
106+
}
107+
108+
message Page {
109+
int64 pn = 1;
110+
int64 ps = 2;
111+
int64 total = 3;
112+
}
113+
114+
message VideoInfo {
115+
int64 cid = 1;
116+
string filename = 2;
117+
int64 duration = 3;
118+
string share_url = 4;
119+
string iframe_url = 5;
120+
}
121+
122+
message AdditInfo {
123+
int32 state = 1;
124+
string state_desc = 2;
125+
string reject_reason = 3;
126+
}
127+
128+
message ArchiveInfo {
129+
string resource_id = 1;
130+
string cover = 2;
131+
int64 tid = 3;
132+
int32 no_reprint = 4;
133+
string desc = 5;
134+
string tag = 6;
135+
int32 copyright = 7;
136+
int64 ctime = 8;
137+
int64 ptime = 9;
138+
VideoInfo video_info = 10;
139+
AdditInfo addit_info = 11;
140+
}

0 commit comments

Comments
 (0)