You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+57-2
Original file line number
Diff line number
Diff line change
@@ -12,17 +12,72 @@ The SDK is available as a NuGet package. You can install it using the following
12
12
dotnet add package IssuuSDK
13
13
```
14
14
15
+
## Authentication
16
+
17
+
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.
18
+
15
19
## Usage
16
20
17
21
### .NET Core & .NET 5+
18
-
TBC
22
+
You can easily add the IssuuSDK to your project by referencing the NuGet package and adding the following configuration and service registration:
23
+
24
+
```json
25
+
{
26
+
"Issuu": {
27
+
"Token": "<token-value>"
28
+
}
29
+
}
30
+
```
31
+
32
+
```csharp
33
+
services.AddIssuu();
34
+
```
35
+
36
+
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.
19
37
20
38
### .NET Framework
21
39
22
-
TBC
40
+
For use on .NET Framework would largely depend on your dependency injection strategy (if you use one).
41
+
42
+
You can easily create an instance of the `IssuuApiClient` class and use it to interact with the Issuu API.
**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.
57
+
58
+
A `IIssuuHttpClientFactory` can be implemented to manage the lifecycle of the `HttpClient` instance.
59
+
60
+
### Debugging
61
+
62
+
To aid in debugging results from the Issuu API, you can enable the following settings:
63
+
64
+
```json
65
+
{
66
+
"Issuu": {
67
+
"CaptureRequestContent": true,
68
+
"CaptureResponseContent": true
69
+
}
70
+
}
71
+
```
72
+
73
+
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.
23
74
24
75
## Open Source
25
76
26
77
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.
27
78
79
+
- .NET Platform by Microsoft and contributors - https://github.com/dotnet
80
+
- Ben.Demystifier by Ben Adams - https://github.com/benaadams/Ben.Demystifier
81
+
- FluentValidation by the Jeremy Skinner and contributors - https://github.com/FluentValidation/FluentValidation
82
+
- MinVer by Adam Ralph and contributors - https://github.com/adamralph/minver
28
83
- SlugGenerator by Artem Polishchuk - https://github.com/polischuk/SlugGenerator
0 commit comments