Skip to content

Commit 89b49db

Browse files
fix: fix caching, querying, and node creation issues
1 parent 1903bd9 commit 89b49db

File tree

5 files changed

+67
-76
lines changed

5 files changed

+67
-76
lines changed

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ module.exports = {
5757
client_id: process.env.OPTMIZELY_API_CLIENT_ID, // The client ID of the Optimizely/Episerver API user. Default is "Default"
5858
},
5959
endpoints: {
60-
OptimizelyAboutUsDesignersPageContentChildren: "/v2.0/content/14675/children?expand=*",
61-
OptimizelyAboutUsPageContentChildren: "/v2.0/content/14110/children?expand=*",
62-
OptimizelyBedAccessoriesHeadboardsPageContentChildren: "/v2.0/content/14129/children?expand=*",
63-
OptimizelyBedAccessoriesLegsPageContentChildren: "/v2.0/content/14131/children?expand=*",
60+
OptimizelyLocations: "/api/locations?lang=en-us&market=US",
61+
OptimizelyAboutUsDesignersPageContentChildren: "/api/episerver/v2.0/content/14675/children?expand=*",
62+
OptimizelyAboutUsPageContentChildren: "/api/episerver/v2.0/content/14110/children?expand=*",
63+
OptimizelyBedAccessoriesHeadboardsPageContentChildren: "/api/episerver/v2.0/content/14129/children?expand=*",
64+
OptimizelyBedAccessoriesLegsPageContentChildren: "/api/episerver/v2.0/content/14131/children?expand=*",
6465
},
6566
},
6667
},
@@ -74,18 +75,21 @@ module.exports = {
7475

7576
Add a single or multiple `endpoints`.
7677

78+
> **Note**: The `endpoints` should start with `/api/**/*` as the base URL will be added automatically via your `options.auth.site_url` value.
79+
7780
```javascript
7881
options: {
7982
// ...
8083

8184
endpoints: {
8285
// Single endpoint
83-
OptimizelyAboutUsDesignersPageContentChildren: "/v2.0/content/14675/children?expand=*",
86+
OptimizelyAboutUsDesignersPageContentChildren: "/api/episerver/v2.0/content/14675/children?expand=*",
8487

8588
// Multiple endpoints
86-
OptimizelyAboutUsPageContentChildren: "/v2.0/content/14110/children?expand=*",
87-
OptimizelyBedAccessoriesHeadboardsPageContentChildren: "/v2.0/content/14129/children?expand=*",
88-
OptimizelyBedAccessoriesLegsPageContentChildren: "/v2.0/content/14131/children?expand=*",
89+
OptimizelyLocations: "/api/locations?lang=en-us&market=US",
90+
OptimizelyAboutUsPageContentChildren: "/api/episerver/v2.0/content/14110/children?expand=*",
91+
OptimizelyBedAccessoriesHeadboardsPageContentChildren: "/api/episerver/v2.0/content/14129/children?expand=*",
92+
OptimizelyBedAccessoriesLegsPageContentChildren: "/api/episerver/v2.0/content/14131/children?expand=*",
8993
}
9094
}
9195
```
@@ -131,7 +135,7 @@ options: {
131135

132136
Set a custom request throttling interval for the Optimizely/Episerver API requests (in milliseconds).
133137

134-
**Default:** `500`.
138+
**Default:** `500` _(0.5 seconds)_.
135139

136140
```javascript
137141
options: {
@@ -145,7 +149,7 @@ options: {
145149

146150
Set a custom request debouncing interval for the Optimizely/Episerver API requests (in milliseconds).
147151

148-
**Default:** `500`.
152+
**Default:** `500` _(0.5 seconds)_.
149153

150154
```javascript
151155
options: {
@@ -178,7 +182,7 @@ options: {
178182
// ...
179183

180184
endpoints: {
181-
OptimizelyAboutUsDesignersPageContentChildren: "/v2.0/content/14675/children?expand=*",
185+
OptimizelyAboutUsDesignersPageContentChildren: "/api/episerver/v2.0/content/14675/children?expand=*",
182186
}
183187
}
184188
```

0 commit comments

Comments
 (0)