update
This commit is contained in:
@@ -17,6 +17,7 @@ service NetworkMembershipContract
|
||||
rpc GetUserNetwork(GetUserNetworkRequest) returns (GetUserNetworkResponse);
|
||||
rpc GetNetworkTree(GetNetworkTreeRequest) returns (GetNetworkTreeResponse);
|
||||
rpc GetNetworkMembershipHistory(GetNetworkMembershipHistoryRequest) returns (GetNetworkMembershipHistoryResponse);
|
||||
rpc GetNetworkStatistics(GetNetworkStatisticsRequest) returns (GetNetworkStatisticsResponse);
|
||||
}
|
||||
|
||||
// JoinNetwork Command
|
||||
@@ -122,3 +123,47 @@ message NetworkMembershipHistoryModel
|
||||
string reason = 11;
|
||||
google.protobuf.Timestamp created = 12;
|
||||
}
|
||||
|
||||
// GetNetworkStatistics Query
|
||||
message GetNetworkStatisticsRequest
|
||||
{
|
||||
// Empty - returns overall statistics
|
||||
}
|
||||
|
||||
message GetNetworkStatisticsResponse
|
||||
{
|
||||
int32 total_members = 1;
|
||||
int32 active_members = 2;
|
||||
int32 left_leg_count = 3;
|
||||
int32 right_leg_count = 4;
|
||||
double left_percentage = 5;
|
||||
double right_percentage = 6;
|
||||
double average_depth = 7;
|
||||
int32 max_depth = 8;
|
||||
repeated LevelDistribution level_distribution = 9;
|
||||
repeated MonthlyGrowth monthly_growth = 10;
|
||||
repeated TopNetworkUser top_users = 11;
|
||||
}
|
||||
|
||||
message LevelDistribution
|
||||
{
|
||||
int32 level = 1;
|
||||
int32 count = 2;
|
||||
}
|
||||
|
||||
message MonthlyGrowth
|
||||
{
|
||||
string month = 1;
|
||||
int32 new_members = 2;
|
||||
}
|
||||
|
||||
message TopNetworkUser
|
||||
{
|
||||
int32 rank = 1;
|
||||
int64 user_id = 2;
|
||||
string user_name = 3;
|
||||
int32 total_children = 4;
|
||||
int32 left_count = 5;
|
||||
int32 right_count = 6;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user