Skip to content

Commit

Permalink
feat: rename queryAll to query
Browse files Browse the repository at this point in the history
  • Loading branch information
younho9 committed Nov 21, 2021
1 parent 1c1551d commit 51074e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const narkdown = new NarkdownClient({
>
> See the complete list of endpoints in the [Notion API reference](https://developers.notion.com/reference)
### `unlimited.databases.queryAll`
### `unlimited.databases.query`

> Unlimited version of [Query a database](https://developers.notion.com/reference/post-database-query)
Expand All @@ -45,7 +45,7 @@ const narkdown = new NarkdownClient({auth: process.env.NOTION_API_KEY});

(async () => {
const databaseId = '897e5a76-ae52-4b48-9fdf-e71f5945d1af';
const response = await narkdown.unlimited.databases.queryAll({
const response = await narkdown.unlimited.databases.query({
database_id: databaseId,
filter: {
or: [
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class NarkdownClient extends NotionClient {
/**
* Query a database without pagination
*/
queryAll: async ({
query: async ({
start_cursor,
...rest
}: QueryDatabaseParameters): Promise<QueryDatabaseResponse> => {
Expand Down
4 changes: 2 additions & 2 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ beforeAll(async () => {
),
);

response = await narkdown.unlimited.databases.queryAll({
response = await narkdown.unlimited.databases.query({
database_id: TEST_DATABASE_ID,
});
}, TIMEOUT);

/** {@link https://developers.notion.com/reference/pagination#responses} */
describe('response of narkdown.unlimited.databases.queryAll', () => {
describe('response of narkdown.unlimited.databases.query', () => {
it(
'has properties',
async () => {
Expand Down

0 comments on commit 51074e8

Please sign in to comment.