-
Notifications
You must be signed in to change notification settings - Fork 0
/
nhk.proto
68 lines (56 loc) · 1.21 KB
/
nhk.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
syntax = "proto3";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
package nhk;
option go_package = "github.com/nhk-news-web-easy/nhk-easy-service-proto;nhk_service";
service NhkService {
rpc GetNews (NewsRequest) returns (NewsReply) {
option (google.api.http) = {
get: "/news"
};
}
rpc GetWords(WordRequest) returns (WordReply) {
option (google.api.http) = {
get: "/words"
};
}
}
message NewsRequest {
google.protobuf.Timestamp startDate = 1;
google.protobuf.Timestamp endDate = 2;
}
message NewsReply {
Error error = 1;
repeated News news = 2;
}
message WordRequest {
string newsId = 1;
}
message WordReply {
Error error = 1;
repeated Word words = 2;
}
message Error {
int32 code = 1;
string message = 2;
}
message News {
string newsId = 1;
string title = 2;
string titleWithRuby = 3;
string outlineWithRuby = 4;
string body = 5;
string url = 6;
string m3u8Url = 7;
string imageUrl = 8;
google.protobuf.Timestamp publishedAtUtc = 9;
}
message Word {
string idInNews = 1;
string name = 2;
repeated WordDefinition definitions = 3;
}
message WordDefinition {
string definition = 1;
string definitionWithRuby = 2;
}