-
Notifications
You must be signed in to change notification settings - Fork 8
/
youtube.proto
113 lines (90 loc) · 2.09 KB
/
youtube.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
syntax = "proto2";
// Search
message SearchParams {
enum SortField {
RELEVANCE = 0;
RATING = 1;
UPLOAD_DATE = 2;
VIEW_COUNT = 3;
}
optional SortField SortBy = 1;
optional SearchFilters Filters = 2;
optional QueryFlags QueryFlags = 8;
}
message SearchFilters {
enum UploadDate {
LAST_HOUR = 1;
TODAY = 2;
THIS_WEEK = 3;
THIS_MONTH = 4;
THIS_YEAR = 5;
}
enum ItemType {
VIDEO = 1;
CHANNEL = 2;
PLAYLIST = 3;
MOVIE = 4;
}
enum VideoDuration {
SHORT = 1;
LONG = 2;
MEDIUM = 3;
}
optional UploadDate UploadedIn = 1;
optional ItemType Type = 2;
optional VideoDuration Duration = 3;
optional bool Hd = 4;
optional bool Subtitles = 5;
optional bool CreativeCommons = 6;
optional bool Resolution3D = 7;
optional bool Live = 8;
optional bool Purchased = 9;
optional bool Resolution4K = 14;
optional bool Vr360 = 15;
optional bool Location = 23;
optional bool Hdr = 25;
optional bool Vr180 = 26;
}
message QueryFlags {
optional bool ExactSearch = 1;
}
// Playlist continuation
message PlaylistContinuationContainer {
required PlaylistContinuation Continuation = 80226972;
}
message PlaylistContinuation {
required string InternalPlaylistId = 2;
required string PaginationInfo = 3;
required string PlaylistId = 35;
}
message PaginationInfo {
required string SkipAmountEncoded = 15;
}
message IntContainer {
required int32 Value = 1;
}
// Initial comments request
// TODO: manage to understand how comment pagination works
message CommentsContinuation {
optional int32 Amount = 1;
required VideoIdContainer VideoId = 2;
required int32 Something = 3;
// required? in the first one
optional CommentsContextContainer ContextContainer = 6;
}
message VideoIdContainer {
required string Id = 2;
}
message CommentsContextContainer {
required CommentsContext Context = 4;
// set to comments-section
required string Source = 8;
}
message CommentsContext {
enum SortOrder {
TOP_COMMENTS = 0;
NEWEST_FIRST = 1;
}
required string VideoId = 4;
required SortOrder SortingOrder = 6;
}