Thing
Reddit::Client::Thing
The base class of all Reddit::Client Things. None of its methods are intended to be used directly.
new ( [ $reddit ,] [ \%source_data ] )
Create a new Thing. The first argument must be a Reddit::Client instance; the second must be a hash reference. Data from the hash reference will be mapped to the object's properties.
load_from_source_data ( \%source_data )
Populate the object with data from $source_data.
set_bool ( $field, $value)
Convert JSON's Boolean type to a 1 or 0. (Perl lacks booleans.)
VotableThing
| Class | Parent class |
|---|---|
| Reddit::Client::VotableThing | Reddit::Client::Thing |
Base class of things that can be voted on, i.e. comments and posts. Contains several methods that are common to posts and comments.
| Method | Description |
|---|---|
| vote(direction) | Vote. Direction must be 1, 0, or -1 (0 to "unvote"). |
| comment(text) | Leave a comment. Returns the fullname of the new comment. |
| save | Save thing |
| unsave | Unsave thing |