This package used as part of the Inboxly service.
Explore sites to find feeds and fetch feeds with last entries.
You can install the package via composer:
composer require inboxly/receiver
<?php
use Inboxly\Receiver\Managers\ExplorerManager;
class ExploreController
{
public function explore(ExplorerManager $manager, string $site){
$result = $manager->explore($site, 'rss');
/** @var \Inboxly\Receiver\Sources\Rss\RssParameters $parameters */
foreach ($result as $parameters) {
dump("Found feed: $parameters->url");
}
}
}
<?php
use Inboxly\Receiver\Contracts\Parameters;
use Inboxly\Receiver\Managers\FetcherManager;
class FetchController
{
public function fetch(FetcherManager $manager, Parameters $parameters){
$feeds = $manager->fetch($parameters);
/** @var \Inboxly\Receiver\Feed $feed */
foreach ($feeds as $feed) {
dump("Fetched feed: $feed->name");
/** @var \Inboxly\Receiver\Entry $entry */
foreach ($feed->entries as $entry) {
dump("Entry in feed: $entry->name");
}
}
}
}
Run the tests with:
composer test
The MIT License (MIT). Please see License File for more information.