This package is abandoned and no longer maintained. No replacement package was suggested.

Todoist Notifications driver

1.0.0 2016-08-23 21:35 UTC

This package is auto-updated.

Last update: 2019-10-21 23:36:04 UTC


README

Latest Version on Packagist Software License Build Status StyleCI SensioLabsInsight Quality Score Code Coverage Total Downloads

This package makes it easy to create Todoist tasks with Laravel 5.3.

Channel Deprecated

Please see this issue for more infomation.
This channel was deprecated in Oct 2019 due to lack of a maintainer.

Contents

Installation

You can install the package via composer:

composer require laravel-notification-channels/todoist

Setting up the Todoist service

In order to add tickets to Todoist users, you need to obtain their access token.

Create a new Todoist App to get started.

Usage

Now you can use the channel in your via() method inside the notification:

use NotificationChannels\Todoist\TodoistChannel;
use NotificationChannels\Todoist\TodoistMessage;
use Illuminate\Notifications\Notification;

class ProjectCreated extends Notification
{
    public function via($notifiable)
    {
        return [TodoistChannel::class];
    }

    public function toTodoist($notifiable)
    {
        return TodoistMessage::create('This is the ticket name.')
                ->priority(4)
                ->due('tomorrow');
    }
}

In order to let your Notification know which Todoist user and Todoist list you are targeting, add the routeNotificationForTodoist method to your Notifiable model.

This method needs to return the access token of the authorized Todoist user.

public function routeNotificationForTodoist()
{
    return 'NotifiableAccessToken';
}

Available methods

  • content(''): Accepts a string value for the Todoist ticket content.
  • projectId(''): Accepts an integer value for the Todoist project id, default is the "Inbox" project.
  • priority(''): Accepts an integer value for the ticket priority. It should be a number between 1 and 4, 4 for very urgent and 1 for natural.
  • indent(''): Accepts an integer value for the ticket indent level. It should be a a number between 1 and 4, where 1 is top-level.
  • itemOrder(''): Accepts an integer value for the ticket item order.
  • collapsed(): Marks the Todoist ticket as collapsed.
  • due(''): Accepts a string or DateTime object for the Todoist ticket due date.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email m.pociot@gmail.com instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.