avfigueredo/feedvel

Package to obtain the feed rss

1.0.0 2021-06-22 20:11 UTC

This package is not auto-updated.

Last update: 2024-04-25 07:41:56 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

About

This package provides an easy way to obtain the feed RSS from a site.

Requirements

PHP 8.0

Installation

You can install the package via composer:

composer require avfigueredo/feedvel

You can publish the config file with:

php artisan vendor:publish --provider="Avfigueredo\Feedvel\FeedvelServiceProvider" --tag="feedvel-config"

This is the contents of the published config file:

return [
    //Specifies the date format.
    'date_format' => 'd/m/Y H:i:s'
];

Commands

You can run the command below passing the URL as a parameter to check if the site has a feed.

php artisan feedvel:feed https://www.theminimalists.com/feed/
+------+-----------------+-------+
| Feed | Title           | Posts |
+------+-----------------+-------+
| OK   | The Minimalists | 10    |
+------+-----------------+-------+

Usage

use Avfigueredo\Feedvel\Feedvel;

$feed = Feedvel::from('https://www.theminimalists.com/feed/');

$feed->successful(); // bool
$feed->error(); // returns the message error.

// Content
$feed->title(); // returns the title.
$feed->author(); // returns the author.
$feed->authors(); // returns the authors.
$feed->posts(); // returns the posts.
$feed->original(); // returns the original simple pie object.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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