add batch game info request
This commit is contained in:
+26
-15
@@ -3,31 +3,32 @@ syntax = "proto3";
|
||||
package items;
|
||||
|
||||
message Person {
|
||||
string name = 1;
|
||||
string name = 1;
|
||||
repeated Opinion opinion = 2;
|
||||
}
|
||||
|
||||
message Opinion {
|
||||
string title = 1;
|
||||
bool would_play = 2;
|
||||
string title = 1;
|
||||
bool would_play = 2;
|
||||
}
|
||||
|
||||
message Game {
|
||||
reserved 3;
|
||||
string title = 1;
|
||||
Source source = 2;
|
||||
string title = 1;
|
||||
Source source = 2;
|
||||
uint32 min_players = 4;
|
||||
uint32 max_players = 5;
|
||||
uint32 price = 6;
|
||||
uint64 remote_id = 7;
|
||||
uint32 price = 6;
|
||||
uint64 remote_id = 7;
|
||||
}
|
||||
|
||||
enum Source {
|
||||
STEAM = 0;
|
||||
STEAM = 0;
|
||||
ROBLOX = 1;
|
||||
}
|
||||
|
||||
message PersonList { repeated Person person = 1; }
|
||||
|
||||
message GameList { repeated Game games = 1; }
|
||||
|
||||
// Authentication messages
|
||||
@@ -37,24 +38,24 @@ message LoginRequest {
|
||||
}
|
||||
|
||||
message LoginResponse {
|
||||
string token = 1;
|
||||
bool success = 2;
|
||||
string token = 1;
|
||||
bool success = 2;
|
||||
string message = 3;
|
||||
}
|
||||
|
||||
message LogoutRequest { string token = 1; }
|
||||
|
||||
message LogoutResponse {
|
||||
bool success = 1;
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
}
|
||||
|
||||
message AuthStatusRequest { string token = 1; }
|
||||
|
||||
message AuthStatusResponse {
|
||||
bool authenticated = 1;
|
||||
string username = 2;
|
||||
string message = 3;
|
||||
bool authenticated = 1;
|
||||
string username = 2;
|
||||
string message = 3;
|
||||
}
|
||||
|
||||
// Authentication service
|
||||
@@ -65,18 +66,28 @@ service AuthService {
|
||||
}
|
||||
|
||||
message GameRequest { string title = 1; }
|
||||
|
||||
message GetGamesRequest {}
|
||||
|
||||
message AddOpinionRequest {
|
||||
string game_title = 1;
|
||||
bool would_play = 2;
|
||||
bool would_play = 2;
|
||||
}
|
||||
|
||||
message RemoveOpinionRequest { string game_title = 1; }
|
||||
|
||||
message GetGameInfoRequest {
|
||||
repeated string games = 1;
|
||||
}
|
||||
|
||||
message GameInfoResponse {
|
||||
repeated Game games = 1;
|
||||
}
|
||||
|
||||
service MainService {
|
||||
rpc GetGame(GameRequest) returns (Game);
|
||||
rpc GetGames(GetGamesRequest) returns (GameList);
|
||||
rpc AddGame(Game) returns (Game);
|
||||
rpc AddOpinion(AddOpinionRequest) returns (Person);
|
||||
rpc GetGameInfo(GetGameInfoRequest) returns (GameInfoResponse);
|
||||
}
|
||||
Reference in New Issue
Block a user