Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sant123/todoist
A Deno wrapper for the Todoist REST API.
https://github.com/sant123/todoist
todoist todoist-api todoist-deno todoist-rest
Last synced: about 1 month ago
JSON representation
A Deno wrapper for the Todoist REST API.
- Host: GitHub
- URL: https://github.com/sant123/todoist
- Owner: sant123
- License: mit
- Created: 2022-01-24T19:34:46.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-05T02:04:03.000Z (almost 3 years ago)
- Last Synced: 2024-09-16T14:49:53.101Z (about 2 months ago)
- Topics: todoist, todoist-api, todoist-deno, todoist-rest
- Language: TypeScript
- Homepage:
- Size: 39.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Todoist API [![Deno](https://github.com/sant123/todoist/actions/workflows/deno.yml/badge.svg)](https://github.com/sant123/todoist/actions/workflows/deno.yml)
This is a [port](https://github.com/Doist/todoist-api-typescript) from the
official TypeScript API client for the Todoist REST API.## Installation
```typescript
import { TodoistApi } from "https://deno.land/x/todoist/mod.ts";
```### Usage
An example of initializing the API client and fetching a user's tasks:
```typescript
import { TodoistApi } from "https://deno.land/x/todoist/mod.ts";const api = new TodoistApi("YOURTOKEN");
api.getTasks()
.then((tasks) => console.log(tasks))
.catch((error) => console.log(error));
```### Documentation
For more detailed reference documentation, have a look at the
[API documentation with TypeScript examples](https://developer.todoist.com/rest/v1/?javascript).## Development and Testing
Instead of having an example app in the repository to assist development and
testing, you can create a `scratch.ts` file. This allows us to have a file
locally that can import and utilize the API while developing or reviewing pull
requests without having to manage a separate app project.- Add a file named `scratch.ts` in the `root` folder.
- Import and call the relevant modules and run the scratch file.Example scratch.ts file:
```typescript
import { TodoistApi } from "./mod.ts";const token = "YOURTOKEN";
const api = new TodoistApi(token);api.getProjects()
.then((projects) => {
console.log(projects);
})
.catch((error) => console.error(error));
```## Releases
A new version is published to the Deno Third Party Registry whenever a new
release on GitHub is created.### Feedback
Any feedback, such as bugs, questions, comments, etc. can be reported as
_Issues_ in this repository.### Contributions
We would also love contributions in the form of _Pull requests_ in this
repository.