Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an RPC proto API for external clank services #52

Open
hashsploit opened this issue Jan 12, 2021 · 0 comments
Open

Create an RPC proto API for external clank services #52

hashsploit opened this issue Jan 12, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request low-priority Low priority request

Comments

@hashsploit
Copy link
Owner

We need an RPC API for external services such as clank-bot Discord Bot etc.

Example:

syntax = "proto3";

option java_package = "net.hashsploit.mediusdiscordbot.proto";

service MediusInformation{
    rpc GetStatus(StatusReq) returns (StatusRes) {}
    rpc GetPlayers(PlayersReq) returns (TableData){}
    rpc GetGames(GamesReq) returns (TableData){}
    rpc BroadcastMessage(BroadcastReq) returns (BroadcastRes){}
}

message BroadcastReq{
    string message = 1;
}

message BroadcastRes{
    bool success = 1;
}

message StatusListing{
    string serverName = 1;
    bool serverActive = 2;
}

message GamesReq{}

message StatusReq{}

message StatusRes{
    repeated StatusListing serverStatuses = 1;
}

message PlayersReq{}

message TableRow{
    repeated string values = 1;
}

message TableData{
    TableRow headers = 1;
    repeated TableRow rows = 2;
}

message PlayerStatus{
    string playerName = 1;
    string status = 2;
}

message PlayersRes{
    // repeated string onlinePlayers = 1;
    repeated PlayerStatus onlinePlayers = 1;
}

message PlayerInfoReq{
    string playerName = 1;
}

message PlayerInfoRes{
    string playerName = 1;
    bool status = 2;
    string clan = 3;
    int32 overallRank = 4;
    int32 skillLevel = 5;
    int32 gamesPlayed = 6;
    int32 wins = 7;
    int32 losses = 8;
    int32 kills = 9;
    int32 deaths = 10;
    int32 nodesTaken = 11;
    int32 squats = 12;
}
@hashsploit hashsploit added enhancement New feature or request high-priority High priority request labels Jan 12, 2021
@hashsploit hashsploit self-assigned this Jan 12, 2021
@jtjanecek jtjanecek added low-priority Low priority request and removed high-priority High priority request labels Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low-priority Low priority request
Projects
None yet
Development

No branches or pull requests

2 participants