1.1.0 • Published 3 years ago

@nuskin/ns-contentstack-lib v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

@nuskin/ns-contentstack-lib

This project contains configuration, runconfig transition, and api code to access Contentstack, to be shared between the backend (AWS Lambda) and frontend (Vue, etc).

Installing

Usng npm:

npm install @nuskin/ns-contentstack-lib

Usng yarn:

yarn add @nuskin/ns-contentstack-lib

Example usage

const { ContentstackApi } = require('@nuskin/ns-contentstack-lib')

// WARNING: this config should come from app/user configuration
const apiKey = "<API Key>";
const deliveryToken = "<Delivery Token>";
const language = "en";

const configData = {
    apiKey: "<API Key>",
    deliveryToken: "<Delivery Token>",
    language: "en" // "en", "en-gb", etc.
};

let contentstackApi = new ContentstackApi(configData);

const entries = await contentstackApi.getEntries("market");

Resources

License

MIT

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago