Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

contentstack

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contentstack

The Built.io Contentstack Javascript SDK

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
48K
decreased by-24.63%
Maintainers
1
Weekly downloads
 
Created
Source

Built.io Contentstack

##Javascript SDK for Built.io Contentstack ##Prerequisite You need to install node.js v0.10.22 or later to use the Built.io Contentstack SDK. ## Installation You might need administrator privileges to perform this installation. ```bash $ npm install contentstack ``` To require the SDK module in your application use the following command. ```bash $ var Contentstack = require('contentstack'); ``` ## Basic Structure The structure followed by SDK logically resembles the "Stack" structure on Built.io Contentstack. Once you have done the basic setup explained in the Installation section, you get a Built.io Contentstack object, which can be used to initialize different modules. The initialization process for each module is explained below. ###Site To initialize a Stack, you need to provide the required keys and values associated with them. ```bash var Stack = Contentstack.Stack({"api_key":<>,"access_token":<>,"environment":<>}); ``` Let us take an example where we try to obtain all entries of the Content Type my_content_type. ```bash var entry = Stack.ContentType(<>).Query(); entry //add query methods here .find() .then(function(data){ //data will contain entries from the specified Content Type; },function(err){ //displays a detailed error in case of failure; }); ``` Let us take another example where we try to obtain only a specific entry from the Content Type my_content_type. ```bash var entry = Stack.ContentType(<>).Entry(<>); entry //add query methods here .fetch() .then(function(data){ //data will contain the specified entry from the specified Content Type; },function(err){ //displays a detailed error in case of failure; }); ``` -----

License

Copyright © 2012-2016 Built.io. All Rights Reserved.

FAQs

Package last updated on 10 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc