Skip to content

Commit

Permalink
V1.0.2 (#67)
Browse files Browse the repository at this point in the history
* renamed installer to authenticatedUser

* renamed installer to authenticatedUser
  • Loading branch information
John Agan authored Nov 2, 2022
1 parent 42852eb commit dd1cd89
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
```


Expand Down
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ declare class Webflow {

// meta
info(): Promise<Webflow.ApiModel.Info>;
installer(): Promise<Webflow.ApiModel.Installer>;
authenticatedUser(): Promise<Webflow.ApiModel.AuthenticatedUser>;

// oauth
authorizeUrl(params: {
Expand Down Expand Up @@ -209,7 +209,7 @@ declare namespace Webflow {
}

namespace ApiModel {
interface Installer {
interface AuthenticatedUser {
user: {
_id: string;
email: string;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion src/Webflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class Webflow {
return this.get("/info");
}

installer() {
authenticatedUser() {
return this.get("/user");
}

Expand Down
2 changes: 1 addition & 1 deletion test/Meta.tests.js → test/Meta.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit dd1cd89

Please sign in to comment.