-
Notifications
You must be signed in to change notification settings - Fork 1
/
wuxiaworld_v2.proto
144 lines (124 loc) · 3.16 KB
/
wuxiaworld_v2.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
syntax = "proto3";
import "google/protobuf/wrappers.proto";
import "google/protobuf/timestamp.proto";
package wuxiaworld.api.v2;
message DecimalValue {
int64 units = 1;
sfixed32 nanos = 2;
};
message ByNovelAndChapterSlug {
string novelSlug = 1;
string chapterSlug = 2;
};
message GetChapterByProperty {
oneof byProperty {
int32 chapterId = 1;
ByNovelAndChapterSlug slugs = 2;
};
};
message GetChapterRequest {
GetChapterByProperty chapterProperty = 1;
};
message GetChapterResponse {
ChapterItem item = 1;
};
message ChapterItem {
int32 entityId = 1;
string name = 2;
string slug = 3;
DecimalValue number = 4;
google.protobuf.StringValue content = 5;
int32 novelId = 6;
bool visible = 7;
bool isTeaser = 8;
google.protobuf.Timestamp whenToPublish = 9;
bool spoilerTitle = 10;
bool allowComments = 11;
bytes relatedChapterInfo = 12;
bytes karmaInfo = 13;
bytes novelInfo = 14;
bytes sponsorInfo = 15;
bytes relatedUserInfo = 16;
int32 offset = 17;
google.protobuf.Timestamp publishedAt = 18;
google.protobuf.StringValue translatorThoughts = 19;
};
message GetChapterListRequest{
int32 novelId = 1;
FilterChapters filter = 2;
};
message FilterChapters{
google.protobuf.Int32Value chapterGroupId = 1;
google.protobuf.BoolValue isAdvanceChapter = 2;
}
message GetChapterListResponse {
repeated ChapterGroupItem items = 1;
ChapterNovelInfo novelInfo = 2;
};
message ChapterGroupItem {
int32 id = 1;
string title = 2;
int32 order = 3;
DecimalValue fromChapterNumber = 4;
DecimalValue toChapterNumber = 5;
repeated ChapterItem chapterList = 6;
};
message ChapterNovelInfo{
int32 id = 1;
string name = 2;
google.protobuf.StringValue coverUrl = 3;
string slug = 4;
bytes karmaInfo = 5;
bool isSneakPeek = 6;
bytes translatorInfo = 7;
google.protobuf.StringValue language = 8;
google.protobuf.StringValue coverBlurHash = 9;
};
message GetNovelRequest {
oneof selector {
int32 id = 1;
string slug = 2;
}
}
message GetNovelResponse{
NovelItem item = 1;
}
message NovelItem {
int32 id = 1;
string name = 2;
string slug = 3;
bytes status = 4;
string abbreviation = 5;
google.protobuf.StringValue language = 6;
bool visible = 7;
google.protobuf.StringValue description = 8;
google.protobuf.StringValue synopsis = 9;
google.protobuf.StringValue coverUrl = 10;
google.protobuf.StringValue translatorName = 11;
bytes translator = 12;
google.protobuf.StringValue authorName = 13;
bytes karmaInfo = 14;
repeated string tags = 15;
repeated string genres = 16;
bytes reviewInfo = 17;
bool isSneakPeek = 18;
bytes sponsorInfo = 19;
google.protobuf.Timestamp createdAt = 20;
google.protobuf.StringValue coverBlurHash = 21;
bool isFeatured = 22;
NovelChapterInfo chapterInfo = 23;
google.protobuf.StringValue licensedFrom = 24;
}
message NovelChapterInfo{
bytes firstChapter = 1;
bytes latestChapter = 2;
google.protobuf.Int32Value chapterCount = 3;
repeated ChapterGroupItem chapterGroups = 4;
}
service Novels {
rpc GetNovel (GetNovelRequest) returns (GetNovelResponse) {};
}
service Chapters {
rpc GetChapter (GetChapterRequest) returns (GetChapterResponse) {};
rpc GetChapterList (GetChapterListRequest) returns (GetChapterListResponse) {};
}