-
Notifications
You must be signed in to change notification settings - Fork 15
/
feed.proto
45 lines (37 loc) · 1.02 KB
/
feed.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
syntax = "proto3";
package douyin.feed;
option go_package = "douyin/feed";
import "user.proto";
message Video {
uint32 id = 1;
user.User author = 2;
string play_url = 3;
string cover_url = 4;
uint32 favorite_count = 5;
uint32 comment_count = 6;
bool is_favorite = 7;
string title = 8;
}
message ListFeedRequest {
optional string latest_time = 1; // 限制返回视频的最新投稿时间戳,精确到秒,不填表示当前时间
optional uint32 actor_id = 2; // 发送请求的用户的id
}
message ListFeedResponse {
uint32 status_code = 1;
optional string status_msg = 2;
optional int64 next_time = 3;
repeated Video video_list = 4;
}
message QueryVideosRequest {
uint32 actor_id = 1;
repeated uint32 video_ids = 2;
}
message QueryVideosResponse {
uint32 status_code = 1;
optional string status_msg = 2;
repeated Video video_list = 3;
}
service FeedService {
rpc ListVideos(ListFeedRequest) returns (ListFeedResponse);
rpc QueryVideos(QueryVideosRequest) returns (QueryVideosResponse);
}