This repository has been archived by the owner on Nov 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathparty.proto
123 lines (98 loc) · 2.57 KB
/
party.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
syntax = "proto3";
package party;
import "google/api/annotations.proto";
option csharp_namespace = "Improbable.OnlineServices.Proto.Party";
message Party {
enum Phase {
UNKNOWN = 0;
FORMING = 1;
MATCHMAKING = 2;
IN_GAME = 3;
}
string id = 1;
string leader_player_id = 2;
uint32 min_members = 3;
uint32 max_members = 4;
repeated string memberIds = 5;
map<string, string> metadata = 6;
Phase current_phase = 7;
}
message CreatePartyRequest {
uint32 min_members = 2;
uint32 max_members = 3;
map<string, string> metadata = 4;
}
message CreatePartyResponse {
string party_id = 1;
}
message GetPartyByPlayerIdRequest {
}
message GetPartyByPlayerIdResponse {
Party party = 1;
}
message DeletePartyRequest {
}
message DeletePartyResponse {
}
message JoinPartyRequest {
string party_id = 2;
}
message JoinPartyResponse {
Party party = 1;
}
message LeavePartyRequest {
}
message LeavePartyResponse {
}
message KickOutPlayerRequest {
string evicted_player_id = 2;
}
message KickOutPlayerResponse {
}
message UpdatePartyRequest {
Party updated_party = 2;
}
message UpdatePartyResponse {
Party party = 1;
}
service PartyService {
rpc CreateParty (CreatePartyRequest) returns (CreatePartyResponse) {
option (google.api.http) = {
post: "/v1/create_party"
body: "*"
};
}
rpc GetPartyByPlayerId (GetPartyByPlayerIdRequest) returns (GetPartyByPlayerIdResponse) {
option (google.api.http) = {
post: "/v1/get_party_by_player_id"
};
}
rpc DeleteParty (DeletePartyRequest) returns (DeletePartyResponse) {
option (google.api.http) = {
post: "/v1/delete_party"
};
}
rpc JoinParty (JoinPartyRequest) returns (JoinPartyResponse) {
option (google.api.http) = {
post: "/v1/join_party/{party_id}"
};
}
rpc LeaveParty (LeavePartyRequest) returns (LeavePartyResponse) {
option (google.api.http) = {
post: "/v1/leave_party"
};
}
rpc KickOutPlayer (KickOutPlayerRequest) returns (KickOutPlayerResponse) {
option (google.api.http) = {
post: "/v1/kick_out_player/{evicted_player_id}"
};
}
// Does not update the member list of the party. Modifications to the member list can be made using
// Join/Leave/KickOut.
rpc UpdateParty (UpdatePartyRequest) returns (UpdatePartyResponse) {
option (google.api.http) = {
post: "/v1/update_party"
body: "*"
};
}
}