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

0.0.8 • Public • Published

boostnote

Documentation WIP

Installation

npm install boostnote

Usage

ES5

const Boostnote = require('boostnote')

const token = 'abc....lzx'
const boostnote = new Boostnote(token)

ES6

import Boostnote from 'boostnote'

const token = 'abc....lzx'
const boostnote = new Boostnote(token)

Retrieving documents

getDocument(id: string)

const documentId = 'efcfe0be-061a-4c7a-10wm-efddc4607vma'
boostnote
  .getDocument(documentId)
  .then((doc) => console.log(doc))
  .catch((err) => console.error(err))

getDocuments()

boostnote
  .getDocuments()
  .then((docs) => console.log(docs))
  .catch((err) => console.error(err))

createDocument(opts)

boostnote
  .createDocument({
    title: 'My title',
    content: '# Heading',
    tags: ['react', 'javascript'],
  })
  .then((doc) => console.log(doc))
  .catch((err) => console.error(err))

updateDocument(opts)

boostnote
  .updateDocument({
    id: '02ba-faoks-01b8....28ext',
    title: 'My new title',
    content: '# Heading',
    tags: ['react', 'javascript'],
  })
  .then((doc) => console.log(doc))
  .catch((err) => console.error(err))

removeDocument(id)

boostnote
  .removeDocument('02ba-faoks-01b8....28ext')
  .catch((err) => console.error(err))

getFolder(id)

boostnote
  .getFolder('02ba-faoks-01b8....28ext')
  .then((folder) => console.log(folder))
  .catch((err) => console.error(err))

getFolders(opts)

boostnote
  .getFolders({
    name: 'mainFolder',
    workspaceId: '01d9-021e3...',
    orderBy: 'createdAt',
  })
  .then((folders) => console.log(folders))
  .catch((err) => console.error(err))

createFolder(opts)

boostnote
  .createFolder({
    name: 'My new folder',
    emoji?: '',
    workspaceId: '01d9-021e3...',
    parentFolderId: 'avkoo-021e3...',
    orderBy: 'createdAt',
  })
  .then((folder) => console.log(folder))
  .catch((err) => console.error(err))

removeFolder(id, opts)

boostnote
  .removeFolder('01d9-021e3...', { force: false })
  .catch((err) => console.error(err))

Package Sidebar

Install

npm i boostnote

Weekly Downloads

4

Version

0.0.8

License

ISC

Unpacked Size

24.8 kB

Total Files

8

Last publish

Collaborators

  • pfftdammitchris