Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified LICENSE.txt
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified config.js
100644 → 100755
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file modified dist/.DS_Store
100644 → 100755
Empty file.
Empty file modified dist/nativescript/contentstack.js
100644 → 100755
Empty file.
1,223 changes: 734 additions & 489 deletions dist/node/contentstack.js
100644 → 100755

Large diffs are not rendered by default.

Empty file modified dist/react-native/contentstack.js
100644 → 100755
Empty file.
Empty file modified dist/web/contentstack.js
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions docs-config.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"opts": {
"template": "csio-templates",
"template": "contentstack-templates",
"encoding": "utf8",
"destination": "./js-sdk-reference/",
"recurse": true
Expand All @@ -19,6 +19,7 @@
]
},
"tags": {
"dictionaries": ["jsdoc", "closure"]
"dictionaries": ["jsdoc", "closure"],
"allowUnknownTags": true
}
}
4 changes: 2 additions & 2 deletions examples/node/contentstack-demo.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ContentstackDemo {
*/
getEntries(contentTypeUid) {
contentTypeUid = contentTypeUid || 'source'
return this.Stack.ContentType(contentTypeUid).Query().toJSON().find()
return this.Stack.ContentType(contentTypeUid).Query().includeReference('secondary_section.reference.reference').find()
}


Expand All @@ -38,7 +38,7 @@ class ContentstackDemo {
getEntry(contentTypeUid, entryUid) {
contentTypeUid = contentTypeUid || 'source'
entryUid = entryUid || 'blt123something'
return this.Stack.ContentType(contentTypeUid).Entry(entryUid).fetch()
return this.Stack.ContentType(contentTypeUid).Entry(entryUid).language('ja-jp').fetch()
}

/**
Expand Down
43 changes: 21 additions & 22 deletions examples/node/index.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,35 @@

const ContentstackDemo = require('./contentstack-demo.js')

const Demo = new ContentstackDemo({ 'api_key': '<api_key>', 'access_token': '<Delivery_token>', 'environment': '<Environment>'})
const Demo = new ContentstackDemo({ 'api_key': 'blt4f29123a87c48c8b', 'access_token': 'bltb77300e99de1ce68', 'environment': 'local'})


// Demo
// .getEntries('source')
// .then(function(result) {
// // result object with entry
// console.info("Result2 : ", result)

// //console.info("Result2 : ", JSON.stringify(result))
Demo
.getEntries('generic_template_1')
.then(function(result) {
// result object with entry
console.log("scnjdncjdncjd", result[0][0].getDownloadUrl())
//console.info("Result2 : ", JSON.stringify(result))

// })
// .catch(function(err) {
// // error of get entry
// console.error("Fetch Error :", err)
// })
})
.catch(function(err) {
// error of get entry
console.error("Fetch Error :", err)
})



//get all the entries
Demo.getSyncApi({"init": true, "type": "asset_published"})
.then(function(result) {
// result object with entries
console.info("Result: ", result)
// Demo.getSyncApi({"init": true, "type": "asset_published"})
// .then(function(result) {
// // result object with entries
// console.info("Result: ", result)

})
.catch(function(err) {
// error of get all entries
console.error("Find Error :", err)
})
// })
// .catch(function(err) {
// // error of get all entries
// console.error("Find Error :", err)
// })



Expand Down
Empty file modified examples/web/favicon.ico
100644 → 100755
Empty file.
Empty file modified examples/web/index.html
100644 → 100755
Empty file.
Empty file modified examples/web/scripts/contentstack.js
100644 → 100755
Empty file.
Empty file modified examples/web/scripts/custom.min.js
100644 → 100755
Empty file.
Loading