The client supports only string as the type for an optional user data parameter.
The client uses only base64 as a BLOB format in JSON.
The client uses only 10 as a base for integers in JSON.
The client doesn't support working with tickets in Signed API.
Code Examples
varclient=newRandomOrgClient("YOUR_API_KEY_HERE");
// Generate an integer from the [0,10] range w/o replacementvarbin=awaitclient.GenerateIntegersAsync(1, 0, 10, false);
// Generate a decimal fraction with 8 decimal places w/o replacementvarbdf=awaitclient.GenerateDecimalFractionsAsync(1, 8, false);
// Generate a number from a Gaussian distribution with mean of 0.0,// standard deviation of 1.0, and 8 significant digitsvarbgs=awaitclient.GenerateGaussiansAsync(1, 0.0m, 1.0m, 8);
// Generate a string with length of 8 from the specified letters w/o replacementvarbst=awaitclient.GenerateStringsAsync(1, 8, "abcdef", false);
// Generate an UUID of version 4varbud=awaitclient.GenerateUuidsAsync(1);
// Generate a BLOB with length of 8 bytesvarbbl=awaitclient.GenerateBlobsAsync(1, 8);
// Generate an integer from the [0,10] range w/o replacement with signaturevarsin=awaitclient.GenerateSignedIntegersAsync(1, 0, 10, false);
// Verify the signature of the previously generated random integervarain=awaitclient.VerifySignatureAsync(sin.Random, sin.GetSignature());
// Get usage information of the current API keyvarusg=awaitclient.GetUsageAsync();
Console.WriteLine("Random integer: "+bin.Random.Data[0]);
Console.WriteLine("Random decimal fraction: "+bdf.Random.Data[0]);
Console.WriteLine("Random Gaussian number: "+bgs.Random.Data[0]);
Console.WriteLine("Random string: "+bst.Random.Data[0]);
Console.WriteLine("Random UUID: "+bud.Random.Data[0]);
Console.WriteLine("Random BLOB: "+Convert.ToBase64String(bbl.Random.Data[0]));
Console.WriteLine("Signed data is authentic: "+ain);
Console.WriteLine("Daily quota requests left: "+usg.RequestsLeft);