Net::Digg - Quickly consume and interface with the Digg API.
use Net::Digg; my $digg = Net::Digg->new(); # Print the user that submitted the latest upcoming story. my $result = $digg->get_upcoming_stories(); print $result->{ 'stories' }[0]->{'title'}; # Print the titles of the twenty latest popular stories my %params = ('count' => 20); $result = $digg->get_popular_stories(\%params); my $stories = $result->{'stories'}; foreach $story (@$stories) { print $story->{'title'} . "\n"; }
See also FUNCTIONS, DESCRIPTION, and EXAMPLES below.
The typical:
Creates the Digg object.
Given
Get all stories.
Get all popular stories.
Get top stories.
Get hot stories.
Get all stories from a given container.
Get all popular stories from a given container.
Get all upcoming stories from a given container.
Get top stories from a given container.
Get hot stories from a given container.
Get all stories from a given topic.
Get all popular stories from a given topic.
Get all upcoming stories from a given topic.
Get top stories from a given topic.
Get hot stories from a given topic.
Get identified story.
Get a list of stories with the given ids.
Get stories submitted by given user.
Get popular stories submitted by given user.
Get upcoming stories submitted by given user.
Get stories dugg by given user.
Get stories commented by given user.
Get stories submitted by given user friends.
Get popular stories submitted by given user friends.
Get upcoming stories submitted by given user friends.
Get stories dugg by given user friends.
Get stories commented by given user friends.
Get all diggs.
Get all popular diggs.
Get all upcoming diggs.
Get all diggs for a given story.
Get all diggs for a list of stories with the given ids.
Get one user's diggs for all stories.
Get several users' diggs for all stories
Get one user digg for a given story.
Get all comments.
Get all comments on popular stories.
Get all comments on upcoming stories.
Get all comments for a list of stories with the given ids.
Get top-level comments for a given story.
Get one user's comments for all stories.
Get several users' comments for all stories.
Get one comment for a given story.
Get one level of replies to one comment for a given story.
Get a list of all error codes and messages.
Get the message for a specific error code.
Get a list of all topics.
Get the specified topic.
Get all users.
Get named user.
Get named user's friends.
Get users who count the named user as a friend.
Get named user's friend.
Get all gallery photos.
Get a list of galleryphotos with the given ids
Get all gallery photo comments.
Get all gallery photo comments for given ids.
Get top-level comments for a given gallery photo.
Get one comment for a given gallery photo.
Get one level of replies to one comment for a given gallery photo.
Get a list of all media.
Get a specified medium.
Get a list of all containers.
Get a specified container.
Returns the query string for an API request.
This module allows developers to quickly consume and interface with the Digg API as defined at http://apidoc.digg.com
Net::Digg uses LWP internally. Any environment variables that LWP supports should be supported by Net::Digg.
I decided to use JSON::Any to parse and convert the JSON returned from the Digg API. The main reason for this is that other similar modules seemed to be using this strategy. I should check to see if there is easier or more desirable way to handle the returned data.
Please report any bugs or feature requests to bug-net-digg@rt.cpan.org, or through the web interface at http://rt.cpan.org.
bug-net-digg@rt.cpan.org
This document describes Net::Digg version 0.1.
Kurt Wilms wilms@cs.umn.edu http://www.kurtwilms.com/ Hey, if you download this module, drop me an email! That's the fun part of this whole open source thing.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included in the distribution and available in the CPAN listing for Net::Digg (see www.cpan.org or search.cpan.org).
To the maximum extent permitted by applicable law, the author of this module disclaims all warranties, either express or implied, including but not limited to implied warranties of merchantability and fitness for a particular purpose, with regard to the software and the accompanying documentation.
To install Net::Digg, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Digg
CPAN shell
perl -MCPAN -e shell install Net::Digg
For more information on module installation, please visit the detailed CPAN module installation guide.