Skip to content

schornio/node-storyblok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-storyblok

Build Status

Install

npm i node-storyblok

Usage

Class Storyblok

Parameters

  • tokens Object, public and private token
  • (endpoint if using a seperate Storyblok API instance)

Example

const Storyblok = require('node-storyblok');
let sb = new Storyblok({ public: 'public_key_here' });

Method Storyblok#getStory

Parameters

  • [return] Promise, Object story
  • id String, story-id
  • options Object
    • version String, default: Storyblok.MODE_PUBLISHED

Example

let sb = new Storyblok({ public: 'public_key_here' });
sb.getStory('home')
  .then((response) => {
    response.story;
  });

Method Storyblok#getStories

Parameters

  • [return] Promise, Array stories
  • options Object
    • version String, default: Storyblok.MODE_PUBLISHED

Example

let sb = new Storyblok({ public: 'public_key_here' });
sb.getStories()
  .then((response) => {
    response.stories;
  });

Contribution

Fork me on Github

About

Storyblok API interface for Node.js (4+)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published