Skip to content

Part of the Inboxly service. Explore sites to find feeds and fetch feeds with last entries.

License

Notifications You must be signed in to change notification settings

inboxly/receiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inboxly Receiver

This package used as part of the Inboxly service.

Explore sites to find feeds and fetch feeds with last entries.

Install

You can install the package via composer:

composer require inboxly/receiver

Usage

Explore site to find feeds

<?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");
        }
    }
}

Fetch feed with entries

<?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");
            }
        }
    }
}

Testing

Run the tests with:

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Part of the Inboxly service. Explore sites to find feeds and fetch feeds with last entries.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages