npm i node-storyblok
Parameters
tokens
Object,public
andprivate
token- (
endpoint
if using a seperate Storyblok API instance)
Example
const Storyblok = require('node-storyblok');
let sb = new Storyblok({ public: 'public_key_here' });
Parameters
[return]
Promise, Objectstory
id
String, story-idoptions
Objectversion
String, default:Storyblok.MODE_PUBLISHED
Example
let sb = new Storyblok({ public: 'public_key_here' });
sb.getStory('home')
.then((response) => {
response.story;
});
Parameters
[return]
Promise, Arraystories
options
Objectversion
String, default:Storyblok.MODE_PUBLISHED
Example
let sb = new Storyblok({ public: 'public_key_here' });
sb.getStories()
.then((response) => {
response.stories;
});
Fork me on Github