WWW::Reddit - interface with reddit.com


WWW-Reddit documentation  | view source Contained in the WWW-Reddit distribution.

Index


NAME

Top

WWW::Reddit - interface with reddit.com

VERSION

Top

Version 0.05

SYNOPSIS

Top

    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

Top

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

Top

Andrew Moore, <amoore at cpan.org>

USAGE NOTE

Top

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

Top

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

Top

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

    perldoc WWW::Reddit




You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Reddit

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/WWW-Reddit

* CPAN Ratings

http://cpanratings.perl.org/d/WWW-Reddit

* Search CPAN

http://search.cpan.org/dist/WWW-Reddit

* Google Code repository

http://code.google.com/p/www-reddit/

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


WWW-Reddit documentation  | view source Contained in the WWW-Reddit distribution.