nocean
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

nocean npm

Notion API client.

⚠️ Only one concurrent task is currently supported.

Install

$ yarn add nocean

Usage

type TDownloadMarkdownOptions = {
  // value of `token_v2` cookie
  token: string
  // https://www.notion.so/<ACCOUNT>/<PAGE>-<BLOCK_ID>
  blockId: string,
  // relative to current working directory
  outputDirPath: string,
}

const downloadMarkdown: (options: TDownloadMarkdownOptions) => Promise<string>
import { downloadMarkdown } from 'nocean'

const result = await downloadMarkdown({
  token: '<TOKEN>',
  blockId: '<BLOCK_ID>',
  outputDirPath: 'notion/',
})

console.log(result)
// /Users/foo/bar/baz/notion

Readme

Keywords

Package Sidebar

Install

npm i nocean

Weekly Downloads

3

Version

0.1.1

License

MIT

Unpacked Size

9.86 kB

Total Files

18

Last publish

Collaborators

  • deepsweet