Windows MacOS Linux

NAME

GitHub::RSS - collect data from Github.com for feeding into RSS

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

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.

METHODS

->new

my $gh = GitHub::RSS->new(
    dbh => {
        dsn => 'dbi:SQLite:dbname=db/issues.sqlite',
    },
);

Constructs a new GitHub::RSS instance

->fetch_issue_comments

->fetch_and_store($user, $repo, $since)

my $since = $gh->last_check;
$gh->fetch_and_store($user, $repo, $since)

Fetches all issues and comments modified after the $since timestamp. If $since is missing or undef, all issues will be retrieved.

->last_check

my $since = $gh->last_check;

Returns the timestamp of the last stored modification or undef if no issue or comment is stored.