Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 11adc5c

Browse files
committed
update README
1 parent 6ec9e77 commit 11adc5c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

readme.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@ Client.getAll({ type: "task" }); // ["task 1", "task 2", ...]
6868
Client.getAll({ type: "project" }); // ["Project 1", "Project 2", ...]
6969
```
7070

71+
### Client.getAllJSON( { type: string } )
72+
73+
This method returns an array of Titles/Names (JSON) of all objects from the type. The JSON has all the tasks/projects info.
74+
75+
- If no param -> returns all tasks JSON.
76+
77+
```js
78+
import TDSClient from "todoist-rest-client";
79+
80+
const Client = new TDSClient(API_TOKEN); //get an api token from your todoist integrations page
81+
82+
Client.getAllJSON(); // [{taskObject}, {taskObject}, {taskObject}, ...]
83+
Client.getAllJSON({ type: "task" }); // [{taskObject}, {taskObject}, {taskObject}, ...]
84+
Client.getAllJSON({ type: "project" }); // [{projectObject}, {projectObject}, {projectObject}]
85+
```
86+
7187
### Client.create( { type: string } , todoistResource)
7288

7389
This method allows creating todoist resources (tasks, projects, ...).

0 commit comments

Comments
 (0)