A .NET SDK built for the Issuu v2 API
The SDK is available as a NuGet package. You can install it using the following command:
dotnet add package IssuuSDK
This SDK does not currently provide the ability to generate an Issuu auth token. Please visit https://issuu.com/home/settings/apicredentials to generate an auth token.
You can easily add the IssuuSDK to your project by referencing the NuGet package and adding the following configuration and service registration:
{
"Issuu": {
"Token": "<token-value>"
}
}
services.AddIssuu();
This will register a default per-request IIssuuApiClient
instance in the service collection. You can then inject this into your services and use it to interact with the Issuu API.
For use on .NET Framework would largely depend on your dependency injection strategy (if you use one).
You can easily create an instance of the IssuuApiClient
class and use it to interact with the Issuu API.
var http = new HttpClient();ite d
var client = new IssuuApiClient(http, new IssuuSettings());
Or, alternatively through the API client factory:
var clientFactory = new IssuuApiClientFactory(new IssuuHttpClientFactory());
var client = clientFactory.CreateClient(new IssuuSettings());
NOTE - On .NET Framework, it is recommended to use a single instance of HttpClient
for the lifetime of your application. This is because the HttpClient
class is designed to be reused and not disposed of after each request.
A IIssuuHttpClientFactory
can be implemented to manage the lifecycle of the HttpClient
instance.
To aid in debugging results from the Issuu API, you can enable the following settings:
{
"Issuu": {
"CaptureRequestContent": true,
"CaptureResponseContent": true
}
}
These settings, when enabled will capture the request and response content for each API call, and the content of these will be available to the IssuuResponse
as RequestContent
and ResponseContent
properties. The SDK will automatically map these results, but for unexpected results, it is useful to understand what has been sent/received.
This SDK is open source and is available under the MIT license. Feel free to contribute to the project by submitting pull requests or issues.
Component | Authors | Website | License |
---|---|---|---|
.NET Platform | Microsoft and contributors | GitHub | MIT |
Ben.Demystifier | Ben Adams | GitHub | Apache V2 |
FluentValidation | Jeremy Skinner and contributors | GitHub | Apache V2 |
Docusaurus | Meta Platforms, Inc and contributors | GitHub | MIT |
MinVer | Adam Ralph and contributors | GitHub | Apache V2 |
SlugGenerator | Artem Polishchuk | GitHub | MIT |
By using this SDK, you agree to the terms of the MIT license used by this project, as well as the terms of the licenses of the components used by this SDK.