From 55cd504b2f54b184cf675394fc10ed608896042f Mon Sep 17 00:00:00 2001 From: James Vidler Date: Mon, 1 Apr 2019 15:45:41 -0400 Subject: [PATCH 1/2] updated to use new access token format --- README.md | 4 ++-- package.json | 2 +- src/content-fetch.js | 4 ++-- src/methods/getContentItem.js | 4 ++-- src/methods/getContentList.js | 4 ++-- src/methods/getPage.js | 6 +++--- src/methods/getSitemapFlat.js | 6 +++--- src/methods/getSitemapNested.js | 6 +++--- test/apiClients.config.js | 4 ++-- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 6d6758b..f24a4b9 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,8 @@ import agility from '@agility/content-fetch' //initialize the api client const api = agility.getApi({ - instanceID: '1234-1234', - accessToken: 'fEpTcRnWO3EahHbojDCeY3PwGwAzpw2gveDuPn2l0nuqFbQYVcWrQ+a3/DHcWgCgn7UL2tgbSOS0AqrEOiXkTg==' + instanceID: '191309ca-e675-4be2-bb29-351879528707', + accessToken: 'aGd13M.fa30c36e553a36f871860407e902da9a7375322457acd6bcda038e60af699411' }); //make the request: get a content item with the ID '22' diff --git a/package.json b/package.json index f9985bc..3bd8410 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@agility/content-fetch", - "version": "0.2.4", + "version": "0.2.5", "description": "JavaScript library for the Agility Fetch API (node and browser)", "main": "dist/agility-content-fetch.node.js", "scripts": { diff --git a/src/content-fetch.js b/src/content-fetch.js index c983764..6a012e8 100644 --- a/src/content-fetch.js +++ b/src/content-fetch.js @@ -36,8 +36,8 @@ import { isHttps } from './utils' * import agility from '@agility/content-fetch' * * const api = agility.getApi({ - * instanceID: '1234-1234', - * accessToken: 'fEpTcRnWO3EahHbojDCeY3PwGwAzpw2gveDuPn2l0nuqFbQYVcWrQ+a3/DHcWgCgn7UL2tgbSOS0AqrEOiXkTg==', + * instanceID: '191309ca-e675-4be2-bb29-351879528707', + * accessToken: 'aGd13M.fa30c36e553a36f871860407e902da9a7375322457acd6bcda038e60af699411', * isPreview: false * }); */ diff --git a/src/methods/getContentItem.js b/src/methods/getContentItem.js index 808b92a..a34f33f 100644 --- a/src/methods/getContentItem.js +++ b/src/methods/getContentItem.js @@ -12,8 +12,8 @@ import { buildRequestUrlPath, buildAuthHeader } from '../utils' * import agility from '@agility/content-fetch' * * const api = agility.getApi({ - * instanceID: '1234-1234', - * accessToken: 'fEpTcRnWO3EahHbojDCeY3PwGwAzpw2gveDuPn2l0nuqFbQYVcWrQ+a3/DHcWgCgn7UL2tgbSOS0AqrEOiXkTg==', + * instanceID: '191309ca-e675-4be2-bb29-351879528707', + * accessToken: 'aGd13M.fa30c36e553a36f871860407e902da9a7375322457acd6bcda038e60af699411', * }); * * api.getContentItem({ diff --git a/src/methods/getContentList.js b/src/methods/getContentList.js index 95fbb37..b793029 100644 --- a/src/methods/getContentList.js +++ b/src/methods/getContentList.js @@ -17,8 +17,8 @@ import { buildRequestUrlPath, buildAuthHeader } from '../utils' * import agility from '@agility/content-fetch' * * const api = agility.getApi({ - * instanceID: '1234-1234', - * accessToken: 'fEpTcRnWO3EahHbojDCeY3PwGwAzpw2gveDuPn2l0nuqFbQYVcWrQ+a3/DHcWgCgn7UL2tgbSOS0AqrEOiXkTg==' + * instanceID: '191309ca-e675-4be2-bb29-351879528707', + * accessToken: 'aGd13M.fa30c36e553a36f871860407e902da9a7375322457acd6bcda038e60af699411', * }); * * api.getContentList({ diff --git a/src/methods/getPage.js b/src/methods/getPage.js index c71d023..48e4cd5 100644 --- a/src/methods/getPage.js +++ b/src/methods/getPage.js @@ -11,9 +11,9 @@ import { buildRequestUrlPath, buildAuthHeader } from '../utils' * * import agility from '@agility/content-fetch' * - * var api = agility.getApi({ - * instanceID: '1234-1234', - * accessToken: 'fEpTcRnWO3EahHbojDCeY3PwGwAzpw2gveDuPn2l0nuqFbQYVcWrQ+a3/DHcWgCgn7UL2tgbSOS0AqrEOiXkTg==' + * const api = agility.getApi({ + * instanceID: '191309ca-e675-4be2-bb29-351879528707', + * accessToken: 'aGd13M.fa30c36e553a36f871860407e902da9a7375322457acd6bcda038e60af699411', * }); * * api.getPage({ diff --git a/src/methods/getSitemapFlat.js b/src/methods/getSitemapFlat.js index 0f848f9..c60944f 100644 --- a/src/methods/getSitemapFlat.js +++ b/src/methods/getSitemapFlat.js @@ -11,9 +11,9 @@ import { buildRequestUrlPath, buildAuthHeader } from '../utils' * * import agility from '@agility/content-fetch' * - * var api = agility.getApi({ - * instanceID: '1234-1234', - * accessToken: 'fEpTcRnWO3EahHbojDCeY3PwGwAzpw2gveDuPn2l0nuqFbQYVcWrQ+a3/DHcWgCgn7UL2tgbSOS0AqrEOiXkTg==' + * const api = agility.getApi({ + * instanceID: '191309ca-e675-4be2-bb29-351879528707', + * accessToken: 'aGd13M.fa30c36e553a36f871860407e902da9a7375322457acd6bcda038e60af699411', * }); * * api.getSitemapFlat({ diff --git a/src/methods/getSitemapNested.js b/src/methods/getSitemapNested.js index 3b9f94f..ad88e75 100644 --- a/src/methods/getSitemapNested.js +++ b/src/methods/getSitemapNested.js @@ -11,9 +11,9 @@ import { buildRequestUrlPath, buildAuthHeader } from '../utils' * * import agility from '@agility/content-fetch' * - * var api = agility.getApi({ - * instanceID: '1234-1234', - * accessToken: 'fEpTcRnWO3EahHbojDCeY3PwGwAzpw2gveDuPn2l0nuqFbQYVcWrQ+a3/DHcWgCgn7UL2tgbSOS0AqrEOiXkTg==' + * const api = agility.getApi({ + * instanceID: '191309ca-e675-4be2-bb29-351879528707', + * accessToken: 'aGd13M.fa30c36e553a36f871860407e902da9a7375322457acd6bcda038e60af699411', * }); * * api.getSitemapNested({ diff --git a/test/apiClients.config.js b/test/apiClients.config.js index 808629d..f3f13e9 100644 --- a/test/apiClients.config.js +++ b/test/apiClients.config.js @@ -2,8 +2,8 @@ import agility from '../src/content-fetch' //Agiliy Instance = 'Headless Integration Testing' const instanceID = 'c741222b-1080-45f6-9a7f-982381c5a485'; -const accessTokenFetch = 'E3JaVBdQbowZWntXsvvObLyjZ82eCB/pmVGjVy8q5NVD0/6t28E/4nShCBzGT2uqleIYBXrW8F81IdKrdATZ3Q=='; -const accessTokenPreview = 'hA9e0rki2BpchWXmcUkrjMcH8dQRgg7uqmRBwMviCcE5cvHSQU8ngP3+OwGO6d22bDbFpa8asJdKH8AwC9W7iw=='; +const accessTokenFetch = 'mn16Ui.17dc2f94908b113a6eb0869681f5cfa77df6dbd181d22943b64bf8ef728b6c5c'; +const accessTokenPreview = 'tR95Pt.cc81dfbe0726263d5d9618b21f49fe33830e5449395820ade1cad3ce89d22ed8'; function createApiClient() { var api = agility.getApi({ From 8b4af853999ba030a2a6705fe608af240242968f Mon Sep 17 00:00:00 2001 From: James Vidler Date: Mon, 1 Apr 2019 15:48:43 -0400 Subject: [PATCH 2/2] fixed formatting issue in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f24a4b9..29bf8e8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://agility.visualstudio.com/Agility CMS/_apis/build/status/Agility%20Content%20Fetch%20JS%20SDK%20-%20Dev?branchName=dev)](https://agility.visualstudio.com/Agility CMS/_build/latest?definitionId=58&branchName=dev) +[![Build Status](https://agility.visualstudio.com/Agility%20CMS/_apis/build/status/Agility%20Content%20Fetch%20JS%20SDK%20-%20Dev?branchName=dev)](https://agility.visualstudio.com/Agility%20CMS/_build/latest?definitionId=58&branchName=dev) [![Netlify Status](https://api.netlify.com/api/v1/badges/c45f5d6e-923b-4019-820e-826e6185017d/deploy-status)](https://app.netlify.com/sites/agilitydocs/deploys) # Agility Content Fetch JS SDK