Giter VIP home page Giter VIP logo

wunderlist's Introduction

Wunderlist notifications channel for Laravel 5.3

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

This package makes it easy to create Wunderlist 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/wunderlist

Setting up the Wunderlist service

Create a new Wunderlist App.

Add your Wunderlist Client-ID to your config/services.php:

// config/services.php
...
'wunderlist' => [
    'key' => env('WUNDERLIST_API_KEY'),
],
...

Usage

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

use NotificationChannels\Wunderlist\WunderlistChannel;
use NotificationChannels\Wunderlist\WunderlistMessage;
use Illuminate\Notifications\Notification;

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

    public function toWunderlist($notifiable)
    {
        return WunderlistMessage::create('Another channel bites the dust')
            ->starred()
            ->due('tomorrow');
    }
}

In order to let your notification know which Wunderlist user and Wunderlist list you are targeting, add the routeNotificationForWunderlist method to your Notifiable model.

This method needs to return an array containing the access token of the authorized Wunderlist user and the list ID of the Wunderlist list to add the ticket to.

public function routeNotificationForWunderlist()
{
    return [
        'token' => 'NotifiableAccessToken',
        'list_id' => 12345,
    ];
}

Available methods

  • title(''): Accepts a string value for the Wunderlist ticket title.
  • assigneeId(''): Accepts a string value for the Wunderlist assignee id.
  • recurrenceCount(''): Accepts an integer value for the ticket recurrence count.
  • recurrenceType(''): Accepts one of these values for the recurrence type: WunderlistMessage::RECURRENCE_TYPE_DAY, WunderlistMessage::RECURRENCE_TYPE_WEEK, WunderlistMessage::RECURRENCE_TYPE_MONTH,WunderlistMessage::RECURRENCE_TYPE_YEAR
  • starred(): Marks the Wunderlist ticket as starred.
  • completed(): Marks the Wunderlist ticket as completed.
  • due(''): Accepts a string or DateTime object for the Wunderlist 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 [email protected] 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.

wunderlist's People

Contributors

mpociot avatar freekmurze avatar jaybizzle avatar atymic avatar casperboone avatar themsaid avatar oyed avatar

Stargazers

Zbyszek Cybulski avatar  avatar Daryle Dale De Silva avatar christ.li avatar Chris Morrell avatar João Sales avatar  avatar Clayton Stone avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

bmitch

wunderlist's Issues

Exception thrown on 201 created

if ($response->getStatusCode() !== 200) {
    throw CouldNotSendNotification::serviceRespondedWithAnError($response);
}

However if a notification is successful, a '201 created' is returned, thus throwing the exception.

Code review

Let me know when you're done, then I'll do a quick code review.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.