2323</head>
2424<body>
2525<!-- Google Tag Manager (noscript) -->
26- <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WGP99J7" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
26+ <noscript><iframe title="Google Tag Manager" src="https://www.googletagmanager.com/ns.html?id=GTM-WGP99J7" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
2727<!-- End Google Tag Manager (noscript) -->
2828<input type="checkbox" id="nav-trigger" class="nav-trigger" />
2929<label for="nav-trigger" class="navicon-button x">
5454 <pre class="prettyprint"><code><script type="text/javascript" src="/path/to/contentstack.min.js"></script>;
5555 </code></pre>
5656 <p>To initialize the SDK, you will need to specify the API Key, Delivery Token, and Environment Name of your stack.</p>
57- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("api_key", "delivery_token", "environment_name" );
57+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment" } );
5858 </code></pre>
5959
6060 <p>To initialize the SDK for European Region you want to set and use European region, refer to the code below:</p>
61- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("api_key", "delivery_token", "environment_name", Contentstack.Region.EU);
61+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment", "region": Contentstack.Region.EU } );
6262 </code></pre>
6363
6464 <h4><a id="For_Nodejs_25"></a>For Node.js</h4>
6969 <pre class="prettyprint"><code>import contentstack from ‘contentstack’
7070 </code></pre>
7171 <p>To initialize the SDK, you will need to specify the API Key, Delivery Token, and Environment Name of your stack.</p>
72- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("api_key", "delivery_token","environment_name ");
72+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key", "delivery_token": "delivery_token", "environment": "environment ");
7373 </code></pre>
7474 <p>To initialize the SDK for European Region you want to set and use European region, refer to the code below:</p>
75- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("api_key", "delivery_token", "environment_name", Contentstack.Region.EU);
75+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment", "region": Contentstack.Region.EU } );
7676 </code></pre>
7777 <h4><a id="For_React_Native_39"></a>For React Native</h4>
7878 <p>React Native uses the Javascript SDK to create apps. To use the JavaScript Delivery SDK, download it from <a href="https://www.contentstack.com/docs/platforms/javascript-browser/javascript_sdk_latest">here</a>, OR install ist via npm:</p>
8282 <pre class="prettyprint" class="prettyprint"><code>import contentstack from `contentstack/react-native`
8383 </code></pre>
8484 <p>To initialize the SDK, you will need to specify the API Key, Delivery Token, and Environment Name of your stack.</p>
85- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("api_key", "delivery_token", "environment_name" );
85+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment" } );
8686 </code></pre>
8787 <p>To initialize the SDK for European Region you want to set and use European region, refer to the code below:</p>
88- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("api_key", "delivery_token", "environment_name", Contentstack.Region.EU) ;
88+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment", "region": Contentstack.Region.EU } ;
8989 </code></pre>
9090 <h3><a id="Key_Concepts_for_using_Contentstack_54"></a>Key Concepts for using Contentstack</h3>
9191 <h4><a id="Stack_56"></a>Stack</h4>
101101 <h3><a id="Contentstack_JavaScript_SDK_5minute_Quickstart_78"></a>Contentstack JavaScript Delivery SDK: 5-minute Quickstart</h3>
102102 <h4><a id="Initializing_your_SDK_80"></a>Initializing your SDK</h4>
103103 <p>You will need to specify the API key, Access token, and Environment Name of your stack to initialize the SDK:</p>
104- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("api_key", "delivery_token", "environment_name" );
104+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment" } );
105105 </code></pre>
106106 <p>Once you have initialized the SDK, you can start getting content in your app.</p>
107107 <h4><a id="Querying_content_from_your_stack_90"></a>Querying content from your stack</h4>
108108 <p>To get a single entry, you need to specify the content type as well as the ID of the entry.</p>
109- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("stack_api_key" , "delivery_token", "environment_name" );
109+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment" } );
110110
111- const Query = Stack.ContentType('blog').Entry("blt123something ");
111+ const Query = Stack.ContentType('blog').Entry("entry_uid ");
112112
113113Query.fetch()
114114.then(function success(entry) {
@@ -122,7 +122,7 @@ Query.fetch()
122122 <pre class="prettyprint"><code>Stack.ContentType(type).Query().language('fr-fr').toJSON().find()</code></pre>
123123It will provide all entries of a content type published on the French locale.</p>
124124 <p>To retrieve multiple entries of a content type, you need to specify the content type uid. You can also specify search parameters to filter results.</p>
125- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("stack_api_key" , "delivery_token", "environment_name" );
125+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment" } );
126126
127127const Query = Stack.ContentType('blog').Query();
128128
@@ -146,7 +146,7 @@ Query
146146<h4><a id="Paginating_Responses"></a>Paginating Responses</h4>
147147<p>In a single instance, the Get Multiple Entries query will retrieve only the first 100 items of the specified content type. You can paginate and retrieve the rest of the items in batches using the <a href="/docs/platforms/javascript-browser/api-reference/Query.html#skip">skip</a> and <a href="/docs/platforms/javascript-browser/api-reference/Query.html#limit">limit</a> parameters in subsequent requests.</p>
148148
149- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("stack_api_key" , "delivery_token", "environment_name" );
149+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment" } );
150150let blogQuery = Stack.ContentType('example').Query();
151151let data = blogQuery.skip(20).limit(20).find()
152152data.then(function(result) {
@@ -158,9 +158,9 @@ data.then(function(result) {
158158
159159 <h4><a id="Querying_content_from_your_stack_90"></a>Querying Assets from your stack</h4>
160160 <p>To get a single asset, you need to specify the UID of the asset.</p>
161- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("stack_api_key" , "delivery_token", "environment_name" );
161+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment" } );
162162
163- const Asset = Stack.Asset("blt123something ");
163+ const Asset = Stack.Asset("<asset_uid> ");
164164
165165Asset.fetch()
166166.then(function success(asset) {
@@ -171,7 +171,7 @@ Asset.fetch()
171171});
172172 </code></pre>
173173 <p>To retrieve multiple assets. You can also specify search parameters to filter results.</p>
174- <pre class="prettyprint"><code>const Stack = Contentstack.Stack("stack_api_key" , "delivery_token", "environment_name" );
174+ <pre class="prettyprint"><code>const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment" } );
175175
176176const Query = Stack.Asset().Query();
177177
@@ -212,15 +212,15 @@ Query.setCachePolicy(Contentstack.CachePolicy.CACHE_THEN_NETWORK)
212212 <p>Following are Image Delivery API examples.</p>
213213 <pre class="prettyprint"><code>
214214// Set the quality 100
215- const Stack = Contentstack.Stack("stack_api_key" , "delivery_token", "environment_name" );
215+ const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment" } );
216216
217217const imageUrl = Stack.imageTransform(imageUrl, {
218218 'quality': 100
219219})
220220 </code></pre>
221221 <pre class="prettyprint"><code>
222222// set the quality to 100, auto optimization, width and height
223- const Stack = Contentstack.Stack("stack_api_key" , "delivery_token", "environment_name" );
223+ const Stack = Contentstack.Stack({ "api_key": "api_key" , "delivery_token": "delivery_token" , "environment": "environment" } );
224224
225225const imageUrl = Stack.imageTransform(imageUrl, {
226226 'quality': 100,
0 commit comments