=================================================================== RCS file: /cvs/HOPE/Net-OpenAMD/lib/Net/OpenAMD.pm,v retrieving revision 1.1.1.1 retrieving revision 1.3 diff -u -r1.1.1.1 -r1.3 --- HOPE/Net-OpenAMD/lib/Net/OpenAMD.pm 2010/06/24 22:45:25 1.1.1.1 +++ HOPE/Net-OpenAMD/lib/Net/OpenAMD.pm 2010/06/24 23:14:23 1.3 @@ -1,6 +1,6 @@ package Net::OpenAMD; -# $RedRiver$ +# $AFresh1: OpenAMD.pm,v 1.2 2010/06/24 22:10:10 andrew Exp $ use warnings; use strict; @@ -8,22 +8,42 @@ use version; our $VERSION = qv('0.0.1'); -# Other recommended modules (uncomment to use): -# use IO::Prompt; -# use Perl6::Export; -# use Perl6::Slurp; -# use Perl6::Say; +my $BASE_URL = 'https://api.hope.net/api/'; +use Class::Std::Utils; -# Module implementation here +use LWP::UserAgent; +use Net::OAuth; +use JSON::Any; +{ -1; # Magic true value required at end of module + my @attr_refs = \(); + + sub new { + my ( $class, $options ) = @_; + my $self = bless anon_scalar(), $class; + my $ident = ident($self); + + return $self; + } + + sub _get { croak 'Unsupported' } + + sub location { my $self = shift; return $self->_get( 'location', @_ ) } + sub speakers { my $self = shift; return $self->_get( 'speakers', @_ ) } + sub talks { my $self = shift; return $self->_get( 'talks', @_ ) } + sub interests { my $self = shift; return $self->_get( 'interests', @_ ) } + sub users { my $self = shift; return $self->_get( 'users', @_ ) } + sub stats { croak 'Unused feature' } +} + +1; # Magic true value required at end of module __END__ =head1 NAME -Net::OpenAMD - [One line description of module's purpose here] +Net::OpenAMD - Perl interface to the OpenAMD API =head1 VERSION @@ -43,11 +63,13 @@ =head1 DESCRIPTION -=for author to fill in: - Write a full description of the module and its features here. - Use subsections (=head2, =head3) as appropriate. +This module is to make it easy to grab information from the OpenAMD project at +The Next Hope. +http://amd.hope.net/ +http://amd.hope.net/2010/05/openamd-api-released-v1-1-1/ + =head1 INTERFACE =for author to fill in: @@ -94,14 +116,15 @@ =head1 DEPENDENCIES -=for author to fill in: - A list of all the other modules that this module relies upon, - including any restrictions on versions, and an indication whether - the module is part of the standard Perl distribution, part of the - module's distribution, or must be installed separately. ] +=over -None. +=item LWP::UserAgent +=item Net::OAuth + +=item JSON::Any + +=back =head1 INCOMPATIBILITIES