Repository navigation
Expand file tree
/
Copy pathprotocol.proto
More file actions
96 lines (79 loc) · 1.69 KB
/
Copy pathprotocol.proto
File metadata and controls
96 lines (79 loc) · 1.69 KB
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
syntax = "proto3";
message Request {
oneof payload {
Login.Request login = 1;
GetWall.Request get_wall = 2;
SetOptions.Request set_options = 3;
GetMe.Request get_me = 4;
SendTwot.Request send_twot = 5;
GetThoughtLeader.Request get_thought_leader = 6;
}
}
message Response {
oneof payload {
Login.Response login = 1;
GetWall.Response get_wall = 2;
SetOptions.Response set_options = 3;
GetMe.Response get_me = 4;
SendTwot.Response send_twot = 5;
GetThoughtLeader.Response get_thought_leader = 6;
}
}
enum ERROR_CODE {
OTHER = 0;
UNAUTHORIZED = 1;
INVALID_CREDENTIALS = 2;
}
message GetThoughtLeader {
message Request {
string nickname = 1;
string token = 2;
}
message Response { ThoughtLeader thought_leader = 1; }
}
message SendTwot {
message Request {
string text = 1;
string token = 2;
}
message Response {}
}
message GetMe {
message Request { string token = 1; }
message Response { Me me = 1; }
}
message GetWall {
message Request { string token = 1; }
message Response { Wall wall = 1; }
}
message Login {
message Request {
string login = 1;
string password = 2;
}
message Response { string token = 1; }
}
message SetOptions {
message Request { Options options = 1; }
message Response {}
}
message Error {
ERROR_CODE code = 1;
string message = 2;
}
message Options { bool debug_logging = 1; bool print_full_request = 2; }
message Wall { repeated Twot twots = 1; }
message Twot {
string id = 1;
string author = 2;
string text = 3;
}
message Me {
string id = 1;
string nickname = 2;
}
message ThoughtLeader {
string id = 1;
string nickname = 2;
repeated Twot twots = 3;
}