Adding the package to a Visual Studio project
- From within Visual Studio, open the Nuget Package Manager
- Search for "dimension data"
- Click Install
- The package will install its dependencies, the Newtonsoft.Json for serializing JSON and Microsoft's ASP.NET WebApi client for sending XML requests over HTTP
Connecting to the API and returning data
The following example shows an example class using the .NET 4.5 async/await patterns. All of the API call methods within the ComputeApiClient are async.
Note : the library use async/await patterns, hence if running in a Console application, the main needs to wait for the tasks to finish before it exists.