Skip to content

Commit 3ec58c5

Browse files
Expose DatabasesClient in Notion sdk client ✨
1 parent f0d5ca0 commit 3ec58c5

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Src/Notion.Client/NotionClient.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
namespace Notion.Client
22
{
3+
public interface INotionClient
4+
{
5+
IUsersClient Users { get; }
6+
IDatabasesClient Databases { get; }
7+
}
8+
39
public class NotionClient : INotionClient
410
{
511
public NotionClient(ClientOptions options)
612
{
7-
Users = new UsersClient(new RestClient(options));
13+
var restClient = new RestClient(options);
14+
Users = new UsersClient(restClient);
15+
Databases = new DatabasesClient(restClient);
816
}
917

10-
public string AuthToken { get; }
1118
public IUsersClient Users { get; }
12-
}
13-
14-
public interface INotionClient
15-
{
16-
string AuthToken { get; }
17-
IUsersClient Users { get; }
19+
public IDatabasesClient Databases { get; }
1820
}
1921
}

0 commit comments

Comments
 (0)