NAME

WWW::Reddit - interface with reddit.com

VERSION

Version 0.05

SYNOPSIS

use WWW::Reddit;

my $r = WWW::Reddit->new( username => $username,
                          password => $password );

$r->post( url   => 'http://www.example.com',
          title => 'The new and wonderful example website' );

METHODS

new

used for instantiation.

my $r = WWW::Reddit->new( username => $username,
                          password => $password );

required arguments:
  username - your reddit.com username
  password - your reddit.com password

post

add a URL to reddit.com

my $id = $r->post( url   => 'http://www.example.com'
                   title => 'The new and wonderful example website' );

required parameters:
  url - the address of the url that you'd like to post
  title - the title that you would like to have appear on reddit.

returns: the string that represents the reddit ID of the URL
posted.

get_id

my $id = $r->get_id();

get the reddit ID of the current submission.

set_id

$r->set_id( '63iup' );

pass in the ID of the reddit submission.

details

fetch the details for a reddit submission

takes an optional reddit ID for a submisstion. Otherwise, uses the
ID already in the object.

returns a hashref that looks like:

   {
     'submitted' => '29 Nov 2007',
     'points'    => '2',
     'upvotes'   => '17',
     'downvotes' => '15'
   };

get_ids_from_feed

my @listlist = $r->get_ids_from_feed();

fetches the RSS feed from reddit and returns the list of reddit IDS
in it. You can pass those IDs into the C<details> method to learn
more about them.

get_id_from_url

pass in a reddit url, and this method attempts to return the reddit
ID in it. This works on both URLs from the website and those from
the RSS feed.

AUTHOR

Andrew Moore, <amoore at cpan.org>

USAGE NOTE

reddit currently requires you to fill out a CAPTCHA to post a submission when using a relatively new account, or maybe one with low karma. This module does not circumvent that check. You therefore need to have a more established reddit account to use this module to submit to reddit. I do not have any intentions of changing this.

BUGS

Please report any bugs or feature requests to bug-www-reddit at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Reddit. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc WWW::Reddit

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2007 Andrew Moore, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.