@agility/content-fetch 1.1.0 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +1 -7
- package/.vscode/launch.json +35 -0
- package/README.md +2 -1
- package/dist/agility-content-fetch.browser.js +416 -6
- package/dist/agility-content-fetch.node.js +7111 -799
- package/package.json +9 -3
- package/src/api-client.js +23 -17
- package/src/content-fetch.js +5 -5
- package/src/methods/getContentItem.js +6 -5
- package/src/methods/getContentList.js +16 -15
- package/src/methods/getPage.js +6 -5
- package/src/methods/getSitemapFlat.js +6 -5
- package/src/methods/getSitemapNested.js +6 -5
- package/src/methods/getSyncContent.js +6 -5
- package/src/methods/getSyncPages.js +6 -5
- package/src/types/ContentList.js +1 -1
- package/src/utils.js +2 -2
- package/test/apiClients.config.js +17 -2
- package/test/getApi.tests.js +15 -0
- package/test/getContentItem.tests.js +37 -10
- package/test/getContentList.tests.js +27 -27
- package/test/getPage.tests.js +6 -6
- package/test/getSitemapFlat.tests.js +5 -5
- package/test/getSitemapNested.tests.js +5 -5
- package/test/getSyncContentItems.tests.js +2 -2
- package/test/getSyncPageItems.tests.js +2 -2
package/.babelrc
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"type": "node",
|
|
6
|
+
"request": "launch",
|
|
7
|
+
"name": "Mocha All",
|
|
8
|
+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
|
|
9
|
+
"args": [
|
|
10
|
+
"--timeout",
|
|
11
|
+
"999999",
|
|
12
|
+
"--colors",
|
|
13
|
+
"${workspaceFolder}/test"
|
|
14
|
+
],
|
|
15
|
+
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/babel-node",
|
|
16
|
+
"console": "integratedTerminal",
|
|
17
|
+
"internalConsoleOptions": "neverOpen"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "node",
|
|
21
|
+
"request": "launch",
|
|
22
|
+
"name": "Mocha Current File",
|
|
23
|
+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
|
|
24
|
+
"args": [
|
|
25
|
+
"--timeout",
|
|
26
|
+
"999999",
|
|
27
|
+
"--colors",
|
|
28
|
+
"${file}"
|
|
29
|
+
],
|
|
30
|
+
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/babel-node",
|
|
31
|
+
"console": "integratedTerminal",
|
|
32
|
+
"internalConsoleOptions": "neverOpen"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ Don't have an Agility CMS instance? Sign up for [Free (forever)](https://account
|
|
|
16
16
|
- Query a content list using a filter syntax
|
|
17
17
|
- Get the details of a media gallery
|
|
18
18
|
- Keep track of syncing content to your app
|
|
19
|
+
- Optional in-memory caching
|
|
19
20
|
|
|
20
21
|
## Getting Started
|
|
21
22
|
In order to use this sdk, you'll need to install the script and you'll also need to authenticate your requests.
|
|
@@ -50,7 +51,7 @@ const api = agility.getApi({
|
|
|
50
51
|
//make the request: get a content item with the ID '22'
|
|
51
52
|
api.getContentItem({
|
|
52
53
|
contentID: 22,
|
|
53
|
-
|
|
54
|
+
locale: 'en-us'
|
|
54
55
|
})
|
|
55
56
|
.then(function(contentItem) {
|
|
56
57
|
//on success
|