Skip to content

Commit 049888b

Browse files
authored
Add getPageProperty (#212)
1 parent fb2d2a1 commit 049888b

File tree

3 files changed

+1935
-22
lines changed

3 files changed

+1935
-22
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@notionhq/client",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "A simple and easy to use client for the Notion API",
55
"engines": {
66
"node": ">=12"

src/Client.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ import {
6464
GetSelfParameters,
6565
GetSelfResponse,
6666
getSelf,
67+
GetPagePropertyParameters,
68+
GetPagePropertyResponse,
69+
getPageProperty,
6770
} from "./api-endpoints"
6871
import nodeFetch from "node-fetch"
6972
import {
@@ -404,6 +407,22 @@ export default class Client {
404407
auth: args?.auth,
405408
})
406409
},
410+
properties: {
411+
/**
412+
* Retrieve page property
413+
*/
414+
retrieve: (
415+
args: WithAuth<GetPagePropertyParameters>
416+
): Promise<GetPagePropertyResponse> => {
417+
return this.request<GetPagePropertyResponse>({
418+
path: getPageProperty.path(args),
419+
method: getPageProperty.method,
420+
query: pick(args, getPageProperty.queryParams),
421+
body: pick(args, getPageProperty.bodyParams),
422+
auth: args?.auth,
423+
})
424+
},
425+
},
407426
}
408427

409428
public readonly users = {

0 commit comments

Comments
 (0)