GitHub-RSS
view release on metacpan or search on metacpan
lib/GitHub/RSS.pm view on Meta::CPAN
package GitHub::RSS;
use strict;
use 5.010;
use Moo 2;
use Filter::signatures;
use feature 'signatures';
no warnings 'experimental::signatures';
use PerlX::Maybe;
use IO::Socket::SSL;
use Net::GitHub;
use DBI;
use JSON;
use Data::Dumper;
our $VERSION = '0.05';
=head1 NAME
GitHub::RSS - collect data from Github.com for feeding into RSS
=head1 SYNOPSIS
my $gh = GitHub::RSS->new(
dbh => {
dsn => "dbi:SQLite:dbname=$store",
},
);
my $last_updated = $gh->last_check;
$gh->fetch_and_store( $github_user => $github_repo, $last_updated );
if( $verbose ) {
print "Updated from $last_updated to " . $gh->last_check, "\n";
};
=head1 DESCRIPTION
This module provides a cache database for GitHub issues and scripts to
periodically update the database from GitHub.
This is mainly used for creating an RSS feed from the database, hence the
name.
=head1 METHODS
=head2 C<< ->new >>
my $gh = GitHub::RSS->new(
dbh => {
dsn => 'dbi:SQLite:dbname=db/issues.sqlite',
},
);
Constructs a new GitHub::RSS instance
=over 4
=item *
B<gh> - instance of L<Net::GitHub>
=cut
has 'gh' => (
is => 'ro',
default => sub( $self ) {
Net::GitHub->new(
maybe access_token => $self->token
),
( run in 2.351 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )