NAME

Mojo::Snoo::Link - Mojo wrapper for Reddit Links (t3_ Things)

SYNOPSIS

use Mojo::Snoo::Link;

# OAuth ONLY. Reddit is deprecating cookie auth soon.
my $link = Mojo::Snoo::Link->new(
    id            => '36x619',
    username      => 'foobar',
    password      => 'very_secret',
    client_id     => 'oauth_client_id',
    client_secret => 'very_secret_oauth',
);

# save this link
$link->save();

ATTRIBUTES

id

The ID of the link. This is required for object instantiation. The constructor can accept a single string value or key/value pairs. Examples:

Mojo::Snoo::Link->new('36x619')->id;
Mojo::Snoo::Link->new(id => '36x619')->id;

METHODS

comments

Returns a Mojo::Collection object containing a list of Mojo::Snoo::Comment objects.

GET /r/$subreddit/comments/article

Accepts arguments for limit and callback (in that order).

API DOCUMENTATION

Please see the official Reddit API documentation for more details regarding the usage of endpoints. For a better idea of how OAuth works, see the Quick Start and the full documentation. There is also a lot of useful information of the redditdev subreddit.

LICENSE

The (two-clause) FreeBSD License. See LICENSE for details.