generated from VLADIMIR/template
update api
This commit is contained in:
+116
@@ -375,6 +375,70 @@ service EveningDetectiveServer {
|
|||||||
summary: "Удалить игру";
|
summary: "Удалить игру";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpc AddTeam(AddTeamReq) returns (AddTeamRsp) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/api/teams",
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
tags : "Команда";
|
||||||
|
summary: "Создать команду";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
rpc UpdateTeam(UpdateTeamReq) returns (UpdateTeamRsp) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
put : "/api/teams/{id}",
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
tags : "Команда";
|
||||||
|
summary: "Обновить команду";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
rpc DeleteTeam(DeleteTeamReq) returns (DeleteTeamRsp) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/api/teams/{id}"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
tags : "Команда";
|
||||||
|
summary: "Удалить команду";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
rpc GiveTeamApplications(GiveTeamApplicationsReq) returns (GiveTeamApplicationsRsp) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/api/teams/{id}/applications",
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
tags : "Команда";
|
||||||
|
summary: "Выдать улику";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
rpc GetTeamActions(GetTeamActionsReq) returns (GetTeamActionsRsp) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/api/teams/{id}/actions"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
tags : "Ходы";
|
||||||
|
summary: "Получить ходы";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
rpc AddTeamAction(AddTeamActionReq) returns (AddTeamActionRsp) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/api/teams/{id}/actions",
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||||
|
tags : "Ходы";
|
||||||
|
summary: "Сделать ход";
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message PingReq {}
|
message PingReq {}
|
||||||
@@ -698,3 +762,55 @@ message DeleteGameReq {
|
|||||||
message DeleteGameRsp {
|
message DeleteGameRsp {
|
||||||
string error = 1;
|
string error = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message AddTeamReq {
|
||||||
|
int32 id = 1;
|
||||||
|
string name = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddTeamRsp {
|
||||||
|
string error = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateTeamReq {
|
||||||
|
string name = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateTeamRsp {
|
||||||
|
string error = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteTeamReq {
|
||||||
|
int64 id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteTeamRsp {
|
||||||
|
string error = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GiveTeamApplicationsReq {
|
||||||
|
int64 id = 1;
|
||||||
|
string name = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GiveTeamApplicationsRsp {
|
||||||
|
string error = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetTeamActionsReq {
|
||||||
|
int64 id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetTeamActionsRsp {
|
||||||
|
string error = 1;
|
||||||
|
repeated Place places = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddTeamActionReq {
|
||||||
|
int64 id = 1;
|
||||||
|
string code = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddTeamActionRsp {
|
||||||
|
string error = 1;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user