Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ dotnet add package Notion.Net

## Usage

Todo
> Before getting started, you need to [create an integration](https://www.notion.com/my-integrations) and find the token. You can learn more about authorization [here](https://developers.notion.com/docs/authorization).

Import and initialize the client using the integration token created above.

![image](https://user-images.githubusercontent.com/18693839/119268863-79925b00-bc12-11eb-92cb-d5a9a8c57fdc.png)

Make A request to any Endpoint. For example you can call below to fetch the paginated list of users.

![image](https://user-images.githubusercontent.com/18693839/119268924-ae9ead80-bc12-11eb-9d1a-925267896d9e.png)



## Contribution Guideline

Expand Down
22 changes: 22 additions & 0 deletions examples/list-users/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Threading.Tasks;
using System.Linq;
using Notion.Client;

namespace list_users
{
class Program
{
static async Task Main(string[] args)
{
var client = new NotionClient(new ClientOptions
{
AuthToken = "<Token>"
});

var usersList = await client.Users.ListAsync();

Console.WriteLine(usersList.Results.Count());
}
}
}
13 changes: 13 additions & 0 deletions examples/list-users/list-users.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>list_users</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Notion.Net" Version="0.2.0-beta" />
</ItemGroup>

</Project>