Getting server information - MangoDevx/BattleMetricsNet GitHub Wiki
Getting the server information depends on which game the server is hosting. All available games will be prefixed with the game name followed by Info.
- Example: Arma3Info
- Example 2: MinecraftInfo
If you do not see your game, you need to use the ServerInfo model. This is a generic less informative model.
Getting the server information requires a serverId, found in the URL of the BattleMetrics server's listing.
- Example:
https://www.battlemetrics.com/servers/arma3/1833029serverId is 1833029
var genericServerInfo = await _bmClient.GetServerInfoAsync<ServerInfo>("serverId");
var arma3ServerInfo = await _bmClient.GetServerInfoAsync<Arma3Info>("serverId");
var minecraftServerInfo = await _bmClient.GetServerInfoAsync<MinecraftInfo>("serverId");Most of the details you'll be looking for are in info.Data.Attributes, however other data is scattered around due to the api response. The api also has some redundant properties you may run into.