Created
February 20, 2019 16:31
-
-
Save DominikAngerer/cb009b0b256c534caf34482b26c19037 to your computer and use it in GitHub Desktop.
get-all-spaces.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install storyblok-js-client | |
const StoryblokClient = require('storyblok-js-client') | |
// Initialize the client with the oauth token so you're | |
// authenticated for the management API | |
const Storyblok = new StoryblokClient({ | |
oauthToken: 'YOUR_OAUTH_TOKEN' | |
}) | |
const start = async () => { | |
let spacesResponse = await Storyblok.get(`spaces/`, {}) | |
console.log(spacesResponse.data) | |
} | |
start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment