Notion.Sharp
0.4.0
dotnet add package Notion.Sharp --version 0.4.0
NuGet\Install-Package Notion.Sharp -Version 0.4.0
<PackageReference Include="Notion.Sharp" Version="0.4.0" />
paket add Notion.Sharp --version 0.4.0
#r "nuget: Notion.Sharp, 0.4.0"
// Install Notion.Sharp as a Cake Addin #addin nuget:?package=Notion.Sharp&version=0.4.0 // Install Notion.Sharp as a Cake Tool #tool nuget:?package=Notion.Sharp&version=0.4.0
Notion-SDK
Unnoficial SDK for around Notion API
Installation
The project is avaiable on Nuget
dotnet add package Notion.Sharp
Usage
The first step for using the SDK is to initialize the client with the Bearer Token and the Notion API Version. You should create a notion integration to get a bearer token.
string bearerToken = BEARER_TOKEN;
string apiVersion = "2021-08-16";
INotion client = Notion.GetClient(bearerToken, apiVersion);
Endpoints
Each notion api endpoint has a corresponding method associated with it
| Name | Method |
|---|---|
| Query a database | QueryDatabaseAsync
|
| Create a database | CreateDatabaseAsync
|
| Update database | UpdateDatabaseAsync
|
| Retrieve a database | GetDatabaseAsync
|
| List databases (deprecated) | GetDatabasesAsync
|
| Retrieve a page | GetPageAsync
|
| Create a page | CreatePageAsync
|
| Update page | UpdatePageAsync
|
| Retrieve a page property item | GetPagePropertyAsync
|
| Retrieve a block | GetBlockAsync
|
| Update a block | UpdateBlockAsync
|
| Retrieve block children | GetBlocksChildrenAsync
|
| Append block children | AppendBlockChildrenAsync
|
| Delete a block | DeleteBlockAsync
|
| Retrieve a user | GetUserAsync
|
| List all users | GetUsersAsync
|
| Retrieve your token's bot user | GetMeAsync
|
| Search | SearchAsync
|
Examples
Make a request to any endpoint
PaginationList<User> users = await client.GetUsersAsync();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
This is a prerelease version