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
@@ -64,6 +64,16 @@ Make A request to any Endpoint. For example you can call below to fetch the pagi
64
64
varusersList=awaitclient.Users.ListAsync();
65
65
```
66
66
67
+
## Dependency Injection
68
+
69
+
Library also provides extension method to register NotionClient with Microsoft dependency injection.
70
+
71
+
```
72
+
services.AddNotionClient(options => {
73
+
AuthToken = "<Token>"
74
+
});
75
+
```
76
+
67
77
### Querying a database
68
78
69
79
After you initialized your client and got an id of a database, you can query it for any contained pages. You can add filters and sorts to your request. Here is a simple example:
@@ -31,6 +31,16 @@ Make A request to any Endpoint. For example you can call below to fetch the pagi
31
31
varusersList=awaitclient.Users.ListAsync();
32
32
```
33
33
34
+
## Register using Microsoft.Extensions.DependencyInjection
35
+
36
+
Library also provides extension method to register NotionClient with Microsoft dependency injection.
37
+
38
+
```
39
+
services.AddNotionClient(options => {
40
+
AuthToken = "<Token>"
41
+
});
42
+
```
43
+
34
44
### Querying a database
35
45
36
46
After you initialized your client and got an id of a database, you can query it for any contained pages. You can add filters and sorts to your request. Here is a simple example:
0 commit comments