Exemple #1
0
        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();
        }
 /// <summary>
 /// ping
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static string Ping(this IRealmRoyaleApiClient operations)
 {
     return(operations.PingAsync().GetAwaiter().GetResult());
 }