create masto client with guzzle client

This commit is contained in:
Alexander Yakovlev 2018-06-06 15:08:52 +07:00
parent 39fd146cec
commit c93e6a5b77

View file

@ -5,6 +5,7 @@ use Mremi\UrlShortener\Model\Link;
use Mremi\UrlShortener\Provider\Bitly\BitlyProvider;
use Mremi\UrlShortener\Provider\Bitly\GenericAccessTokenAuthenticator;
use Revolution\Mastodon\MastodonClient;
use GuzzleHttp\Client;
$config = Yaml::parse(file_get_contents('config.yml'));
$lastrun = 0;
@ -85,7 +86,7 @@ $telegram = new Longman\TelegramBot\Telegram(
$config['TELEGRAM_API_KEY'],
$config['TELEGRAM_BOT_NAME']
);
$mastodon = new MastodonClient();
$mastodon = new MastodonClient(new Client);
foreach ($articles as $article) {
if (strtotime($article['pubDate']) <= $lastrun) {