Code Monkey home page Code Monkey logo

notion's Introduction

Notion + TypeScript

notion

TypeScript packages for Notion's unofficial API, data types, and related utilities.

NPM Build Status Prettier Code Formatting

Usage

import { NotionAPI } from 'notion-client'

const api = new NotionAPI()

// this will fetch all blocks for the given page as well as any collection data
// for collection views contained on the page
const page = await api.getPage('067dd719-a912-471e-a9a3-ac10710e7fdf')

// example of fetching the data for a specific collection instance
const collectionId = '2d8aec23-8281-4a94-9090-caaf823dd21a'
const collectionViewId = 'ab639a5a-853e-45e1-9ef7-133b486c0acf'
const colectionData = await api.getCollectionData(
  collectionId,
  collectionViewId
)

All examples use this public notion workspace which aims to cover 100% of Notion's public functionality.

Docs

Package NPM Docs Description
notion-client NPM docs TypeScript client for the unofficial Notion API.
notion-types NPM docs TypeScript types for core Notion data structures.
notion-utils NPM docs Useful utilities for working with Notion data.

Related

  • notion test suite - Comprehensive suite of public Notion pages to test individual features.
  • react-notion - React renderer for Notion data.
  • notion-api-worker - Notion API proxy exposed as a Cloudflare Worker.
    • Currently doesn't handle collection data very robustly.
  • notion-api-agent - Alternative Notion API client.

License

MIT © Travis Fischer

Support my OSS work by following me on twitter twitter

This project extends MIT-licensed work by Timo Lins, Tobias Lins, Sam Wight, and other contributors.

notion's People

Contributors

transitive-bullshit avatar

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.