UsageClient Class |
Namespace: SelectPdf.Api
The UsageClient type exposes the following members.
Name | Description | |
---|---|---|
UsageClient |
Construct the Usage client.
|
Name | Description | |
---|---|---|
getUsage |
Get API usage information.
| |
getUsage(Boolean) |
Get API usage information with history if specified.
|
using System; using SelectPdf.Api; namespace SelectPdf.Api.Tests { class Program { static void Main(string[] args) { string apiKey = "Your API key here"; Console.WriteLine("This is SelectPdf-{0}.", ApiClient.CLIENT_VERSION); try { // get API usage UsageClient usageClient = new UsageClient(apiKey); UsageInformation usage = usageClient.getUsage(false); Console.WriteLine("Conversions remained this month: {0}.", usage.Available); } catch (Exception ex) { Console.WriteLine("An error occurred: " + ex.Message); } } } }