Implemented node system statistics
This commit is contained in:
@@ -54,6 +54,19 @@ public class NodeService
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<SystemStatisticsDto> GetStatisticsAsync(Node node)
|
||||
{
|
||||
var client = ClientFactory.CreateClient();
|
||||
|
||||
var request = CreateBaseRequest(node, HttpMethod.Get, "api/system/statistics");
|
||||
|
||||
var response = await client.SendAsync(request);
|
||||
|
||||
await EnsureSuccessAsync(response);
|
||||
|
||||
return (await response.Content.ReadFromJsonAsync<SystemStatisticsDto>(SerializationContext.Default.Options))!;
|
||||
}
|
||||
|
||||
private static HttpRequestMessage CreateBaseRequest(
|
||||
Node node,
|
||||
[StringSyntax(StringSyntaxAttribute.Uri)]
|
||||
|
||||
Reference in New Issue
Block a user