/// <summary> /// getdataused /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <System.Collections.Generic.IList <DataUsed> > GetDataUsedAsync(this IRealmRoyaleApiClient operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetDataUsedWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
private static async Task ExecuteApiDataStats(IRealmRoyaleApiClient client) { // Example contacting the API and getting a raw response from the client Console.WriteLine("Pinging API..."); var ping = await client.PingAsync(); Console.WriteLine(ping); Console.WriteLine(); var dataUsed = await client.GetDataUsedWithHttpMessagesAsync(); var rawResponseContent = await dataUsed.Response.Content.ReadAsStringAsync(); Console.WriteLine(rawResponseContent); Console.WriteLine(); }