From dd1cd8914f397f610b1b07680e92eabfb9abdf35 Mon Sep 17 00:00:00 2001 From: John Agan Date: Tue, 1 Nov 2022 17:33:11 -0700 Subject: [PATCH] V1.0.2 (#67) * renamed installer to authenticatedUser * renamed installer to authenticatedUser --- README.md | 10 +++++----- index.d.ts | 4 ++-- package.json | 2 +- src/Webflow.js | 2 +- test/{Meta.tests.js => Meta.test.js} | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) rename test/{Meta.tests.js => Meta.test.js} (95%) diff --git a/README.md b/README.md index df8d75c1..370ca598 100644 --- a/README.md +++ b/README.md @@ -131,8 +131,8 @@ const auth = await webflow.accessToken({ // you now have the user's access token to make API requests with const userWF = new Webflow({ token: auth.access_token }); -// pull information for the installer -const installer = await userWF.installer(); +// pull information for the user +const authenticatedUser = await userWF.authenticatedUser(); ``` ### Revoke Token @@ -233,10 +233,10 @@ const webhook = await site.createWebhook({ ``` -### Installer +### Authenticated User ```javascript -// pull information for the installer -const installer = await webflow.installer(); +// pull information for the authenticated user +const authenticatedUser = await webflow.authenticatedUser(); ``` diff --git a/index.d.ts b/index.d.ts index e04ce329..5361ef89 100644 --- a/index.d.ts +++ b/index.d.ts @@ -28,7 +28,7 @@ declare class Webflow { // meta info(): Promise; - installer(): Promise; + authenticatedUser(): Promise; // oauth authorizeUrl(params: { @@ -209,7 +209,7 @@ declare namespace Webflow { } namespace ApiModel { - interface Installer { + interface AuthenticatedUser { user: { _id: string; email: string; diff --git a/package.json b/package.json index cb65348f..9a210b62 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "webflow-api", "description": "Webflow's official Node.js SDK for Data APIs", - "version": "1.0.1", + "version": "1.0.2", "types": "index.d.ts", "main": "dist/index.js", "contributors": [ diff --git a/src/Webflow.js b/src/Webflow.js index 799b4d4b..0654ff06 100644 --- a/src/Webflow.js +++ b/src/Webflow.js @@ -45,7 +45,7 @@ export class Webflow { return this.get("/info"); } - installer() { + authenticatedUser() { return this.get("/user"); } diff --git a/test/Meta.tests.js b/test/Meta.test.js similarity index 95% rename from test/Meta.tests.js rename to test/Meta.test.js index d4022c59..9c66849d 100644 --- a/test/Meta.tests.js +++ b/test/Meta.test.js @@ -30,7 +30,7 @@ describe("Meta", () => { const { response } = MetaFixture.installer; const scope = api.get("/user").reply(200, response); - const result = await webflow.installer(); + const result = await webflow.authenticatedUser(); scope.done(); expect(result).toBeDefined();