Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Reddit(3)	      User Contributed Perl Documentation	     Reddit(3)

NAME
       Reddit -	Perl extension for http://www.reddit.com

       See github for the most up to date/development branch:
       https://github.com/three18ti/Reddit.pm

SYNOPSIS
	 use Reddit;

	 # instantatiate a new reddit object
	 # Automajically handles logging in and	cookie handling
	 $r = Reddit->new(
	     {
		 user_name => 'Foo',
			 password  => 'Bar',
			 subreddit => 'Perl'
		 }
	 );

	 # Submit a link
	 # $title, $url, $subreddit
	 # This	overrides a subreddit set duriing instantiation
	 $r->submit_link( 'Test', 'http://example.com',	'NotPerl');

	 # Submit a Self Post
	 # $title, $text, $subreddit
	 # This	overrides a subreddit set during instantiation
	 $r->submit_story( 'Self.test',	'Some Text Here', 'shareCoding');

	 # Post	a top level comment to a URL or	.self post
	 $r->comment($post_id, $comment);

	 # Post	a reply	to a comment
	 $r->comment($comment_id, $comment);

DESCRIPTION
       Perl module for interacting with	Reddit.

       This module is still largely inprogress.

   Requires
	 common::sense
	 LWP::UserAgent
	 JSON
	 HTTP::Cookies

	 For Testing:
	 Data::Dumper

   EXPORT
       None.

Provided Methods
       submit_link($title, $url, $subreddit)
	     $r->submit_link( 'Test', 'http://example.com', 'NotPerl');

	 This method posts links to the	specified subreddit.  The subreddit
	 parameter is optional if it is	not set	at the time of instantiation
	 $subreddit is required	in one place or	the other, subreddit specified
	 here will take	precedence over	the subreddit specified	at time	of
	 instantiation.

       submit_story($title, $text, $subreddit)
	     $r->submit_story( 'Self.test', 'Some Text Here', 'shareCoding');

	 This method makes a Self.post to the specified	subreddit.  The
	 subreddit parameter is	optional if it is not set at the time of
	 instantiation $subreddit is required in one place or the other,
	 subreddit specified here will take precedence over the	subreddit
	 specified at time of instantiation.

       comment($post_id, $comment)
	 To post a top level comment to	a URL or .self post

	     $r->comment($post_id, $comment);

	 To post a reply to a comment

	     $r->comment($comment_id, $comment);

	 This methid requires you pass in the cannonical thing ID with the
	 correct thing prefix.	Submit methods return cannonical thing IDs,
	 See the FULLNAME Glossary <https://github.com/reddit/reddit/wiki/API>
	 for futher information

	 The post_id is	the alphanumeric string	after the name of the
	 subreddit, before the title of	the post The comment_id	is the
	 alphanumeric string after the title of	the post

SEE ALSO
       <https://github.com/reddit/reddit/wiki>

AUTHOR
       Jon A, <info[replacewithat]cyberspacelogistics[replacewithdot]com>

COPYRIGHT AND LICENSE
       Copyright (C) 2011 by jon

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself, either Perl	version	5.12.4 or, at
       your option, any	later version of Perl 5	you may	have available.

perl v5.32.0			  2012-07-17			     Reddit(3)

NAME | SYNOPSIS | DESCRIPTION | Provided Methods | SEE ALSO | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Reddit&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help