NAME

Mojo::Snoo::Thing - Mojo wrapper for Reddit Things

SYNOPSIS

use Mojo::Snoo::Thing;

# OAuth ONLY. Reddit is deprecating cookie auth soon.
my $thing = Mojo::Snoo::Thing->new(
    name          => 't3_36x619',
    username      => 'foobar',
    password      => 'very_secret',
    client_id     => 'oauth_client_id',
    client_secret => 'very_secret_oauth',
);

# save this listing (or "thing")
$thing->save();

ATTRIBUTES

id

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

Mojo::Snoo::Thing->new('t3_36x619')->name;
Mojo::Snoo::Thing->new(name => 't3_36x619')->name;

METHODS

comments

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

GET /r/$subreddit/comments/article

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.