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

Commit cfd5764

Browse files
committed
update readme
1 parent a8af770 commit cfd5764

File tree

1 file changed

+88
-4
lines changed

1 file changed

+88
-4
lines changed

readme.md

Lines changed: 88 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,95 @@
11
# TODOIST-REST-CLIENT v.0.0.3
22

3-
## Working on
3+
## _A simple todoist-rest-api client_
44

5-
- New resources: Projects & Sections !!
5+
## Important changes
6+
7+
- Now `create` function returns a boolean: true if the resource was created successfully and false if not.
68
- New general functions:
7-
- Find by ID
8-
- Get JSONs => implementing methods for getting JSON (not content/name arrays)
9+
- Get JSONs => implemented methods for getting JSON (not content/name arrays)
10+
- Now you can create projects!
11+
12+
```js
13+
import TDSClient, { Project } from "todoist-rest-client";
14+
const myClient = new TDSClient(apiToken);
15+
myClient.create({ type: "project" }, new Project({ name: "New Project" }));
16+
```
17+
18+
# TODOIST-REST-CLIENT
19+
20+
## _A simple todoist-rest-api client_
21+
22+
A todoist rest API client with:
23+
24+
## Implemented Features
25+
26+
- get Today Tasks
27+
- get All Tasks/Projects
28+
- create task/project (see examples)
29+
30+
I'll implement more features in the future like:
31+
32+
- new resources
33+
- more tasks functions
34+
35+
> something important
36+
37+
## Installation
38+
39+
For installing the client:
40+
41+
```sh
42+
npm install todoist-rest-client
43+
```
44+
45+
## USE
46+
47+
```js
48+
import TDSClient from "todoist-rest-client";
49+
50+
const Client = new TDSClient(API_TOKEN); //get an api token from your todoist integrations page
51+
```
52+
53+
## API
54+
55+
### Client.create({type}, todoistResource)
56+
57+
This method allows creating todoist resources (tasks, projects, ...).
58+
If no params are given, it creates a _No_Content_ task in the inbox.
59+
If given type param, creates default todoistResourceType.
60+
61+
```js
62+
//Creating a todoist resource
63+
import TDSClient from "todoist-rest-client";
64+
65+
const Client = new TDSClient(API_TOKEN); //get an api token from your todoist integrations page
66+
67+
Client.create({ type: "task" });
68+
```
69+
70+
## Todoist Resources
71+
72+
Todoist resources are classes that allow you to easyly create resource objects for todoist.
73+
They can be imported directly from the package:
74+
75+
```js
76+
import {Task, Project} from "todoist-rest-client";
77+
78+
const myTask = new Task({....});
79+
const myProject = new Project({....});
80+
```
81+
82+
### Task
83+
84+
Tasks are the basic pieces of todoist. Each task has a lot of properties: content, date, priority...
85+
86+
### Project
87+
88+
Projects are the way to organize tasks in a simple way. Each project has, at least, a `name` property.
89+
90+
### Future Implementations
91+
92+
In future versions of this package, I'd like to implement more resources to work with sections, comments and all the Todoist's stuff.
993

1094
## License
1195

0 commit comments

Comments
 (0)