laravel-notification-channels / evernote
Evernote Notifications driver
Requires
- php: >=5.6.4
- evernote/evernote-cloud-sdk-php: 2.0.*
- illuminate/events: 5.3.*
- illuminate/notifications: ^5.3@dev
- illuminate/support: 5.1.*|5.2.*|5.3.*
Requires (Dev)
- mockery/mockery: ^0.9.5
- orchestra/database: 3.3.x-dev
- orchestra/testbench: 3.3.x-dev
- phpunit/phpunit: 4.*
This package is auto-updated.
Last update: 2019-10-21 00:31:49 UTC
README
Channel Deprecated
Please see this issue for more infomation.
This channel was deprecated in Oct 2019 due to lack of a maintainer.
This package makes it easy to create Evernote notes with Laravel 5.3.
Contents
Installation
You can install the package via composer:
composer require laravel-notification-channels/evernote
Setting up the Evernote service
In order to add tickets to Evernote users, you need to obtain their access token.
Create a sandbox Evernote API key to get started.
To simplify development, you can also generate your personal development access token.
Usage
Now you can use the channel in your via()
method inside the notification:
use NotificationChannels\Evernote\EvernoteChannel; use NotificationChannels\Evernote\EvernoteContent; use NotificationChannels\Evernote\EvernoteMessage; use Illuminate\Notifications\Notification; class ProjectCreated extends Notification { public function via($notifiable) { return [EvernoteChannel::class]; } public function toEvernote($notifiable) { return EvernoteMessage::create('Evernote message title') ->sandbox() ->content(EvernoteContent::create('Evernote content is here')) ->tags(['Laravel','Notifications']) ->reminder('tomorrow'); } }
In order to let your Notification know which Evernote user you are targeting, add the routeNotificationForEvernote
method to your Notifiable model.
This method needs to return the access token of the authorized Evernote user.
public function routeNotificationForEvernote() { return 'NotifiableAccessToken'; }
Available Message methods
title('')
: Accepts a string for the Evernote ticket title.content(EvernoteContent)
: Accepts an EvernoteContent object.sandbox()
: Enables the Evernote sandbox mode (defaultfalse
).done()
: Marks the Evernote ticket as done.tags('')
: Accepts an array with tags to add to the Evernote ticket.reminder('')
: Accepts a string or DateTime object for the Evernote ticket reminder.
Available Content methods
content('')
: Accepts a string value for the Evernote ticket content.html()
: Sets the content type to HTML.plain()
: Sets the content type to Plaintext (default).
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.