webflow-api 1.2.1 → 1.2.2

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Webflow CMS API Client
1
+ # Webflow Data API SDK
2
2
 
3
3
  ## Installation
4
4
 
@@ -8,9 +8,9 @@ Using npm:
8
8
  $ npm install webflow-api
9
9
  ```
10
10
 
11
- using yarn
11
+ Using yarn
12
12
 
13
- ```
13
+ ```shell
14
14
  $ yarn add webflow-api
15
15
  ```
16
16
 
package/dist/api/oauth.js CHANGED
@@ -27,7 +27,8 @@ class OAuth {
27
27
  if (scope)
28
28
  params["scope"] = scope;
29
29
  const url = "/oauth/authorize";
30
- return client.getUri({ url, method: "GET", params });
30
+ const baseURL = client.defaults.baseURL.replace("api.", "");
31
+ return client.getUri({ baseURL, url, method: "GET", params });
31
32
  }
32
33
  /**
33
34
  * Get an access token
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "webflow-api",
3
3
  "description": "Webflow's official Node.js SDK for Data APIs",
4
- "version": "1.2.1",
4
+ "version": "1.2.2",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "contributors": [
package/src/api/oauth.ts CHANGED
@@ -63,7 +63,8 @@ export class OAuth {
63
63
  if (scope) params["scope"] = scope;
64
64
 
65
65
  const url = "/oauth/authorize";
66
- return client.getUri({ url, method: "GET", params });
66
+ const baseURL = client.defaults.baseURL.replace("api.", "");
67
+ return client.getUri({ baseURL, url, method: "GET", params });
67
68
  }
68
69
 
69
70
  /**