sb-mig
Version:
CLI to rule the world. (and handle stuff related to Storyblok CMS)
18 lines (17 loc) • 474 B
JavaScript
import StoryblokClient from "storyblok-js-client";
export function createClient(options) {
const sbApi = new StoryblokClient({
oauthToken: options.oauthToken,
accessToken: options.accessToken,
rateLimit: options.rateLimit ?? 3,
cache: {
clear: "auto",
type: "none",
},
}, "https://mapi.storyblok.com/v1");
return {
config: options,
sbApi,
spaceId: options.spaceId,
};
}