npm install @pullnote/client
import { PullnoteClient } from '@pullnote/client';
const pn = new PullnoteClient(PULLNOTE_KEY );
// Store
await pn.add('/about', {
title: 'About',
content: 'About the **Pullnote** Headless Content API'
});
// Retrieve
var content = await pn.getMd('/about'); // For the raw Markdown
var content = await pn.getHtml('/about'); // If you prefer to directly render as HTML
Svelte, React, Next, Vue and other Javascript frameworks npm install @pullnote/client the npm repository.
Rust, Go, C, Swift, Flutter, Python use the REST API directly to pull content into anything with the ability to fetch data
API calls return and accept note structure variables.
All content added and retrieved programatically can also be edited via the https://pullnote.com/console console.
Call pn.list(path) to retrieve surrounding notes for breadcrumb trails or other menus.
var list = await pn.list("/blog");
// Or just retrieve the notes you specifically want, e.g. for breadcrumbs:
var breadcrumbs = await pn.getParents(path);
See building menus