Skip to content

Commit

Permalink
Add getPageProperty (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
almawang authored Oct 11, 2021
1 parent fb2d2a1 commit 049888b
Show file tree
Hide file tree
Showing 3 changed files with 1,935 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@notionhq/client",
"version": "0.4.2",
"version": "0.4.3",
"description": "A simple and easy to use client for the Notion API",
"engines": {
"node": ">=12"
Expand Down
19 changes: 19 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ import {
GetSelfParameters,
GetSelfResponse,
getSelf,
GetPagePropertyParameters,
GetPagePropertyResponse,
getPageProperty,
} from "./api-endpoints"
import nodeFetch from "node-fetch"
import {
Expand Down Expand Up @@ -404,6 +407,22 @@ export default class Client {
auth: args?.auth,
})
},
properties: {
/**
* Retrieve page property
*/
retrieve: (
args: WithAuth<GetPagePropertyParameters>
): Promise<GetPagePropertyResponse> => {
return this.request<GetPagePropertyResponse>({
path: getPageProperty.path(args),
method: getPageProperty.method,
query: pick(args, getPageProperty.queryParams),
body: pick(args, getPageProperty.bodyParams),
auth: args?.auth,
})
},
},
}

public readonly users = {
Expand Down
Loading

0 comments on commit 049888b

Please sign in to comment.