Git Product home page Git Product logo

notion-sharp's Introduction

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();

notion-sharp's People

Contributors

bushero avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

mlykes

notion-sharp's Issues

Add xml docs for the endpoints

As a user, I want to get documentation in the browser for the endpoints I use, so that it is clear for me how to use them.

Notion Client Creation

As a user of the Notion.SDK library,
I want to be able to initialize a client with my Bearer Token,
So that I can interact with the Notion's endpoints.

Add a README.md

As a user, I want to see an awesome readme page when navigation to the github page of the project, so that I know what this project is all about without looking to the source code.

Search

As a user,
I want to be able to search the Notion for all the pages
Search

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.