node-storyblok
v2.0.0
Published
Storyblok API interface for Node.js (4+)
Downloads
1
Readme
node-storyblok
Install
npm i node-storyblok
Usage
Class 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' });
Method Storyblok#getStory
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;
});
Method Storyblok#getStories
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;
});
Contribution
Fork me on Github