0.1.1 • Published 4 years ago

nocean v0.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

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
0.1.1

4 years ago

0.1.0

4 years ago

0.0.0

4 years ago