donut-org / donut
v0.8.0
2018-07-02 17:30 UTC
Requires
- php: >=5.6.0
- czproject/logger: ^0.9.0
- dg/rss-php: ^1.2
- dg/twitter-php: ^3.6
- dibi/dibi: ^3.1
- facebook/graph-sdk: ^5.6
- mgp25/instagram-php: ^3.1
- nette/http: ^2.4
- nette/utils: ^2.4
- ramsey/uuid: ^3.6
Requires (Dev)
- nette/tester: ^1.7
This package is auto-updated.
Last update: 2024-12-21 20:19:22 UTC
README
Installation
Download a latest package or use Composer:
composer require donut-org/donut
Donut requires PHP 5.6.0 or later.
Usage
<?php require __DIR__ . '/vendor/autoload.php'; // init $adapter = new Donut\Adapters\DibiSqliteAdapter(__DIR__ . '/app/db.sq3'); $processor = new Donut\Processor($adapter, function () { sleep(5 * 60); // 5 minutes }); // prepare tasks $facebookQueue = $processor->createQueue('facebook-queue') ->facebookPublishFacebookPost($accountId, $appId, $appSecret, $userAccessToken); $processor->createQueue('blogposts-queue') ->rssFeedFetchNewItems('https://example.com/feed/rss', '1h') ->rssFeedConvertItemToFacebookPost('NEW BLOGPOST! %TITLE%', $facebookQueue); // RUN! $processor->run(100); // number of repeats
License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/