-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8af96d8
commit 232830f
Showing
2 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,80 @@ | ||
[](https://github.com/FabianBeiner/Todoist-PHP-API-Library/tags) * [](https://github.com/FabianBeiner/Todoist-PHP-API-Library/stargazers) * [](https://github.com/FabianBeiner/Todoist-PHP-API-Library/issues) * [](https://github.com/FabianBeiner/Todoist-PHP-API-Library/blob/master/LICENSE) * [](https://www.codacy.com/app/FabianBeiner/Todoist-PHP-API-Library?utm_source=github.com&utm_medium=referral&utm_content=FabianBeiner/Todoist-PHP-API-Library&utm_campaign=Badge_Grade)# Todoist PHP API Library**This repository contains an _unofficial_ open source PHP client library that provides a native interface to the official [Todoist REST API](https://developer.todoist.com/rest/v8/) (v8).**## Requirements- [PHP](http://php.net/): >= 7.0- [guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle): ~6.3## InstallationYou can either use [**Composer**](https://getcomposer.org/) or simply [**download the latest release**](https://github.com/FabianBeiner/Todoist-PHP-API-Library/releases) and do your stuff.### ComposerIf you don’t have Composer installed, follow the [installation instructions](https://getcomposer.org/doc/00-intro.md).Once composer is installed, execute the following command in your project root to install this library:```shcomposer require fabian-beiner/todoist-php-api-library```Finally, remember to include the autoloader to your project:```phprequire __DIR__ . '/vendor/autoload.php';```## Obtain your personal API token[Just click here](https://todoist.com/Users/viewPrefs?page=integrations). Or open the [Todoist web app](https://todoist.com), click on the gear icon , select “Settings”, then “Integrations”. Your API token is listed on the bottom of this page.## Usage```php$Todoist = new FabianBeiner\Todoist\Todoist('YOUR_API_TOKEN');```## Methods & Examples### [“Projects” methods and examples](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#projects-methods-and-examples)* [Get all projects](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#get-all-projects)* [Create a new project](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#create-a-new-project)* [Get a project](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#get-a-project)* [Update a project](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#update-actually-rename-a-project)* [Delete a project](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#delete-a-project)### [“Tasks” methods and examples](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks)* [Get tasks](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks)* [Create a new task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks)* [Get a task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks)* [Update a task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks)* [Close a task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks)* [Reopen a task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks)* [Delete a task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks)### [“Comments” methods and examples](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#comments-methods-and-examples)* [Get all comments](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#get-all-comments)* [Create a new comment](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#create-a-new-comment)* [Get a comment](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#get-a-comment)* [Update a comment](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#update-a-comment)* [Delete a comment](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#delete-a-comment)### [“Labels” methods and examples](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#labels-methods-and-examples)* [Get all labels](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#get-all-labels)* [Create a new label](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#create-a-new-label)* [Get a label](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#get-a-label)* [Update a label](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#update-actually-rename-a-label)* [Delete a label](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#delete-a-label)## ContributingI’d be happy if you contribute to this library. Please try to follow the existing coding style and use proper comments in your commit message. 🙏## LicensePlease see the [license file](https://github.com/FabianBeiner/Todoist-PHP-API-Library/blob/master/LICENSE) for more information. | ||
[](https://github.com/FabianBeiner/Todoist-PHP-API-Library/tags) * [](https://github.com/FabianBeiner/Todoist-PHP-API-Library/stargazers) * [](https://github.com/FabianBeiner/Todoist-PHP-API-Library/issues) * [](https://github.com/FabianBeiner/Todoist-PHP-API-Library/blob/master/LICENSE) * [](https://www.codacy.com/app/FabianBeiner/Todoist-PHP-API-Library?utm_source=github.com&utm_medium=referral&utm_content=FabianBeiner/Todoist-PHP-API-Library&utm_campaign=Badge_Grade) * [](https://styleci.io/repos/28313097/) | ||
|
||
# Todoist PHP API Library | ||
|
||
**This repository contains an _unofficial_ open source PHP client library that provides a native interface to the official [Todoist REST API](https://developer.todoist.com/rest/v8/) (v8).** | ||
|
||
## Requirements | ||
- [PHP](http://php.net/): >= 7.0 | ||
- [guzzlehttp/guzzle](https://packagist.org/packages/guzzlehttp/guzzle): ~6.3 | ||
|
||
## Installation | ||
|
||
You can either use [**Composer**](https://getcomposer.org/) or simply [**download the latest release**](https://github.com/FabianBeiner/Todoist-PHP-API-Library/releases) and do your stuff. | ||
|
||
### Composer | ||
|
||
If you don’t have Composer installed, follow the [installation instructions](https://getcomposer.org/doc/00-intro.md). | ||
|
||
Once composer is installed, execute the following command in your project root to install this library: | ||
|
||
```sh | ||
composer require fabian-beiner/todoist-php-api-library | ||
``` | ||
|
||
Finally, remember to include the autoloader to your project: | ||
|
||
```php | ||
require __DIR__ . '/vendor/autoload.php'; | ||
``` | ||
|
||
## Obtain your personal API token | ||
[Just click here](https://todoist.com/Users/viewPrefs?page=integrations). Or open the [Todoist web app](https://todoist.com), click on the gear icon , select “Settings”, then “Integrations”. Your API token is listed on the bottom of this page. | ||
|
||
## Usage | ||
```php | ||
$Todoist = new FabianBeiner\Todoist\Todoist('YOUR_API_TOKEN'); | ||
``` | ||
|
||
## Methods & Examples | ||
|
||
### [“Projects” methods and examples](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#projects-methods-and-examples) | ||
|
||
* [Get all projects](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#get-all-projects) | ||
* [Create a new project](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#create-a-new-project) | ||
* [Get a project](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#get-a-project) | ||
* [Update a project](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#update-actually-rename-a-project) | ||
* [Delete a project](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Projects#delete-a-project) | ||
|
||
### [“Tasks” methods and examples](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks) | ||
|
||
* [Get tasks](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks) | ||
* [Create a new task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks) | ||
* [Get a task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks) | ||
* [Update a task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks) | ||
* [Close a task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks) | ||
* [Reopen a task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks) | ||
* [Delete a task](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Tasks) | ||
|
||
### [“Comments” methods and examples](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#comments-methods-and-examples) | ||
|
||
* [Get all comments](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#get-all-comments) | ||
* [Create a new comment](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#create-a-new-comment) | ||
* [Get a comment](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#get-a-comment) | ||
* [Update a comment](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#update-a-comment) | ||
* [Delete a comment](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Comments#delete-a-comment) | ||
|
||
### [“Labels” methods and examples](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#labels-methods-and-examples) | ||
|
||
* [Get all labels](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#get-all-labels) | ||
* [Create a new label](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#create-a-new-label) | ||
* [Get a label](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#get-a-label) | ||
* [Update a label](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#update-actually-rename-a-label) | ||
* [Delete a label](https://github.com/FabianBeiner/Todoist-PHP-API-Library/wiki/Methods:-Labels#delete-a-label) | ||
|
||
## Contributing | ||
I’d be happy if you contribute to this library. Please try to follow the existing coding style and use proper comments in your commit message. 🙏 | ||
|
||
## License | ||
|
||
Please see the [license file](https://github.com/FabianBeiner/Todoist-PHP-API-Library/blob/master/LICENSE) for more information. |