diff options
author | franck cuny <franck@lumberjaph.net> | 2009-11-26 18:21:01 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2009-11-26 18:21:01 +0100 |
commit | 1931d497364d7afef46f7d54d94d0b13efad5850 (patch) | |
tree | f7bf5c09dc5a9c6e96a860eef819b39eb74e2511 /lib | |
parent | rename (diff) | |
download | net-backtype-1931d497364d7afef46f7d54d94d0b13efad5850.tar.gz |
update tests makefile pod and declaration
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Net/Backtweet.pm | 17 | ||||
-rw-r--r-- | lib/Net/Backtype.pm | 18 |
2 files changed, 22 insertions, 13 deletions
diff --git a/lib/Net/Backtweet.pm b/lib/Net/Backtweet.pm index 03abb0d..ba84758 100644 --- a/lib/Net/Backtweet.pm +++ b/lib/Net/Backtweet.pm @@ -4,9 +4,11 @@ use Moose; use MooseX::Net::API; extends 'Net::Backtype'; -has format => ( is => 'ro', isa => 'Str', default => 'json', ); -has '+api_base_url' => ( default => 'http://backtweets.com' ); -format_query 'format' => ( mode => 'append' ); +net_api_declare backtweet => ( + base_url => 'http://backtweets.com', + format => 'json', + format_mode => 'append', +); net_api_method backtweet_search => ( path => '/search', @@ -26,10 +28,11 @@ Net::Backtweet - client for the backtweet API use Net::Backtweet; my $client = Net::Backtweet->new(); + my $res = $client->backtweet_search(q => 'http://lumberjaph.net', key => $mykey); =head1 DESCRIPTION -Net::Backtype is a client for the backtweet API +Net::Backtype is a client for the backtweet API. =head2 METHODS @@ -43,12 +46,16 @@ See L<http://backtweets.com/api>. =head1 AUTHOR -franck cuny E<lt>franck.cuny@rtgi.frE<gt> +franck cuny E<lt>franck@lumberjaph.netE<gt> =head1 SEE ALSO =head1 LICENSE +Copyright 2009 by Linkfluence + +http://linkfluence.net + This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/lib/Net/Backtype.pm b/lib/Net/Backtype.pm index 58d9fa8..ac7816c 100644 --- a/lib/Net/Backtype.pm +++ b/lib/Net/Backtype.pm @@ -5,14 +5,11 @@ use MooseX::Net::API; our $VERSION = '0.01'; -has api_base_url => ( - isa => 'Str', - is => 'rw', - default => 'http://api.backtype.com' +net_api_declare backtype => ( + base_url => 'http://api.backtype.com', + format => 'json', + format_mode => 'append', ); -has format => ( is => 'ro', isa => 'Str', default => 'json', ); - -format_query 'format' => ( mode => 'append' ); net_api_method user_comments => ( path => '/user/$user/comments', @@ -102,6 +99,7 @@ Net::Backtype - client for the backtype API use Net::Backtype; my $client = Net::Backtype->new(); + my $res = $client->comments_page(url => 'http://...', key => $mykey); =head1 DESCRIPTION @@ -159,12 +157,16 @@ See L<http://www.backtype.com/developers/page-comments-stats>. =head1 AUTHOR -franck cuny E<lt>franck.cuny@rtgi.frE<gt> +franck cuny E<lt>franckcuny@lumberjaph.netE<gt> =head1 SEE ALSO =head1 LICENSE +Copyright 2009 by Linkfluence + +http://linkfluence.net + This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |