[BACK]Return to OpenAMD.pm CVS log [TXT][DIR] Up to [local] / HOPE / Net-OpenAMD / lib / Net

Annotation of HOPE/Net-OpenAMD/lib/Net/OpenAMD.pm, Revision 1.3

1.1       andrew      1: package Net::OpenAMD;
                      2:
1.3     ! andrew      3: # $AFresh1: OpenAMD.pm,v 1.2 2010/06/24 22:10:10 andrew Exp $
1.1       andrew      4:
                      5: use warnings;
                      6: use strict;
                      7: use Carp;
                      8:
                      9: use version; our $VERSION = qv('0.0.1');
                     10:
1.2       andrew     11: my $BASE_URL = 'https://api.hope.net/api/';
1.1       andrew     12:
1.2       andrew     13: use Class::Std::Utils;
1.1       andrew     14:
1.2       andrew     15: use LWP::UserAgent;
                     16: use Net::OAuth;
                     17: use JSON::Any;
1.1       andrew     18:
1.2       andrew     19: {
1.1       andrew     20:
1.2       andrew     21:     my @attr_refs = \();
                     22:
                     23:     sub new {
                     24:         my ( $class, $options ) = @_;
                     25:         my $self = bless anon_scalar(), $class;
                     26:         my $ident = ident($self);
                     27:
                     28:         return $self;
                     29:     }
                     30:
                     31:     sub _get { croak 'Unsupported' }
                     32:
                     33:     sub location  { my $self = shift; return $self->_get( 'location',  @_ ) }
                     34:     sub speakers  { my $self = shift; return $self->_get( 'speakers',  @_ ) }
                     35:     sub talks     { my $self = shift; return $self->_get( 'talks',     @_ ) }
                     36:     sub interests { my $self = shift; return $self->_get( 'interests', @_ ) }
                     37:     sub users     { my $self = shift; return $self->_get( 'users',     @_ ) }
                     38:     sub stats { croak 'Unused feature' }
                     39: }
                     40:
                     41: 1;    # Magic true value required at end of module
1.1       andrew     42: __END__
                     43:
                     44: =head1 NAME
                     45:
1.2       andrew     46: Net::OpenAMD - Perl interface to the OpenAMD API
1.1       andrew     47:
                     48:
                     49: =head1 VERSION
                     50:
                     51: This document describes Net::OpenAMD version 0.0.1
                     52:
                     53:
                     54: =head1 SYNOPSIS
                     55:
                     56:     use Net::OpenAMD;
                     57:
                     58: =for author to fill in:
                     59:     Brief code example(s) here showing commonest usage(s).
                     60:     This section will be as far as many users bother reading
                     61:     so make it as educational and exeplary as possible.
                     62:
                     63:
                     64: =head1 DESCRIPTION
                     65:
1.2       andrew     66: This module is to make it easy to grab information from the OpenAMD project at
                     67: The Next Hope.
1.1       andrew     68:
1.2       andrew     69: http://amd.hope.net/
1.3     ! andrew     70:
        !            71: http://amd.hope.net/2010/05/openamd-api-released-v1-1-1/
1.1       andrew     72:
                     73: =head1 INTERFACE
                     74:
                     75: =for author to fill in:
                     76:     Write a separate section listing the public components of the modules
                     77:     interface. These normally consist of either subroutines that may be
                     78:     exported, or methods that may be called on objects belonging to the
                     79:     classes provided by the module.
                     80:
                     81:
                     82: =head1 DIAGNOSTICS
                     83:
                     84: =for author to fill in:
                     85:     List every single error and warning message that the module can
                     86:     generate (even the ones that will "never happen"), with a full
                     87:     explanation of each problem, one or more likely causes, and any
                     88:     suggested remedies.
                     89:
                     90: =over
                     91:
                     92: =item C<< Error message here, perhaps with %s placeholders >>
                     93:
                     94: [Description of error here]
                     95:
                     96: =item C<< Another error message here >>
                     97:
                     98: [Description of error here]
                     99:
                    100: [Et cetera, et cetera]
                    101:
                    102: =back
                    103:
                    104:
                    105: =head1 CONFIGURATION AND ENVIRONMENT
                    106:
                    107: =for author to fill in:
                    108:     A full explanation of any configuration system(s) used by the
                    109:     module, including the names and locations of any configuration
                    110:     files, and the meaning of any environment variables or properties
                    111:     that can be set. These descriptions must also include details of any
                    112:     configuration language used.
                    113:
                    114: Net::OpenAMD requires no configuration files or environment variables.
                    115:
                    116:
                    117: =head1 DEPENDENCIES
                    118:
1.2       andrew    119: =over
                    120:
                    121: =item LWP::UserAgent
                    122:
                    123: =item Net::OAuth
1.1       andrew    124:
1.2       andrew    125: =item JSON::Any
1.1       andrew    126:
1.2       andrew    127: =back
1.1       andrew    128:
                    129: =head1 INCOMPATIBILITIES
                    130:
                    131: =for author to fill in:
                    132:     A list of any modules that this module cannot be used in conjunction
                    133:     with. This may be due to name conflicts in the interface, or
                    134:     competition for system or program resources, or due to internal
                    135:     limitations of Perl (for example, many modules that use source code
                    136:     filters are mutually incompatible).
                    137:
                    138: None reported.
                    139:
                    140:
                    141: =head1 BUGS AND LIMITATIONS
                    142:
                    143: =for author to fill in:
                    144:     A list of known problems with the module, together with some
                    145:     indication Whether they are likely to be fixed in an upcoming
                    146:     release. Also a list of restrictions on the features the module
                    147:     does provide: data types that cannot be handled, performance issues
                    148:     and the circumstances in which they may arise, practical
                    149:     limitations on the size of data sets, special cases that are not
                    150:     (yet) handled, etc.
                    151:
                    152: No bugs have been reported.
                    153:
                    154: Please report any bugs or feature requests to
                    155: C<bug-net-openamd@rt.cpan.org>, or through the web interface at
                    156: L<http://rt.cpan.org>.
                    157:
                    158:
                    159: =head1 AUTHOR
                    160:
                    161: Andrew Fresh  C<< <andrew@cpan.org> >>
                    162:
                    163:
                    164: =head1 LICENSE AND COPYRIGHT
                    165:
                    166: Copyright (c) 2010, Andrew Fresh C<< <andrew@cpan.org> >>. All rights reserved.
                    167:
                    168: This module is free software; you can redistribute it and/or
                    169: modify it under the same terms as Perl itself. See L<perlartistic>.
                    170:
                    171:
                    172: =head1 DISCLAIMER OF WARRANTY
                    173:
                    174: BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
                    175: FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
                    176: OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
                    177: PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
                    178: EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
                    179: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
                    180: ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
                    181: YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
                    182: NECESSARY SERVICING, REPAIR, OR CORRECTION.
                    183:
                    184: IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
                    185: WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
                    186: REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
                    187: LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
                    188: OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
                    189: THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
                    190: RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
                    191: FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
                    192: SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
                    193: SUCH DAMAGES.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>