Annotation of HOPE/Net-OpenAMD/lib/Net/OpenAMD.pm, Revision 1.5
1.1 andrew 1: package Net::OpenAMD;
2:
1.5 ! andrew 3: # $AFresh1: OpenAMD.pm,v 1.4 2010/06/24 22:26:55 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.4 andrew 68:
69: http://wiki.hope.net/Attendee_Meta-Data
1.1 andrew 70:
1.2 andrew 71: http://amd.hope.net/
1.3 andrew 72:
73: http://amd.hope.net/2010/05/openamd-api-released-v1-1-1/
1.5 ! andrew 74:
! 75: http://travisgoodspeed.blogspot.com/2010/06/hacking-next-hope-badge.html
1.1 andrew 76:
77: =head1 INTERFACE
78:
79: =for author to fill in:
80: Write a separate section listing the public components of the modules
81: interface. These normally consist of either subroutines that may be
82: exported, or methods that may be called on objects belonging to the
83: classes provided by the module.
84:
85:
86: =head1 DIAGNOSTICS
87:
88: =for author to fill in:
89: List every single error and warning message that the module can
90: generate (even the ones that will "never happen"), with a full
91: explanation of each problem, one or more likely causes, and any
92: suggested remedies.
93:
94: =over
95:
96: =item C<< Error message here, perhaps with %s placeholders >>
97:
98: [Description of error here]
99:
100: =item C<< Another error message here >>
101:
102: [Description of error here]
103:
104: [Et cetera, et cetera]
105:
106: =back
107:
108:
109: =head1 CONFIGURATION AND ENVIRONMENT
110:
111: =for author to fill in:
112: A full explanation of any configuration system(s) used by the
113: module, including the names and locations of any configuration
114: files, and the meaning of any environment variables or properties
115: that can be set. These descriptions must also include details of any
116: configuration language used.
117:
118: Net::OpenAMD requires no configuration files or environment variables.
119:
120:
121: =head1 DEPENDENCIES
122:
1.2 andrew 123: =over
124:
125: =item LWP::UserAgent
126:
127: =item Net::OAuth
1.1 andrew 128:
1.2 andrew 129: =item JSON::Any
1.1 andrew 130:
1.2 andrew 131: =back
1.1 andrew 132:
133: =head1 INCOMPATIBILITIES
134:
135: =for author to fill in:
136: A list of any modules that this module cannot be used in conjunction
137: with. This may be due to name conflicts in the interface, or
138: competition for system or program resources, or due to internal
139: limitations of Perl (for example, many modules that use source code
140: filters are mutually incompatible).
141:
142: None reported.
143:
144:
145: =head1 BUGS AND LIMITATIONS
146:
147: =for author to fill in:
148: A list of known problems with the module, together with some
149: indication Whether they are likely to be fixed in an upcoming
150: release. Also a list of restrictions on the features the module
151: does provide: data types that cannot be handled, performance issues
152: and the circumstances in which they may arise, practical
153: limitations on the size of data sets, special cases that are not
154: (yet) handled, etc.
155:
156: No bugs have been reported.
157:
158: Please report any bugs or feature requests to
159: C<bug-net-openamd@rt.cpan.org>, or through the web interface at
160: L<http://rt.cpan.org>.
161:
162:
163: =head1 AUTHOR
164:
165: Andrew Fresh C<< <andrew@cpan.org> >>
166:
167:
168: =head1 LICENSE AND COPYRIGHT
169:
170: Copyright (c) 2010, Andrew Fresh C<< <andrew@cpan.org> >>. All rights reserved.
171:
172: This module is free software; you can redistribute it and/or
173: modify it under the same terms as Perl itself. See L<perlartistic>.
174:
175:
176: =head1 DISCLAIMER OF WARRANTY
177:
178: BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
179: FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
180: OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
181: PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
182: EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
183: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
184: ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
185: YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
186: NECESSARY SERVICING, REPAIR, OR CORRECTION.
187:
188: IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
189: WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
190: REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
191: LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
192: OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
193: THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
194: RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
195: FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
196: SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
197: SUCH DAMAGES.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>