diff options
author | franck cuny <franck@lumberjaph.net> | 2010-06-07 09:38:38 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-06-07 09:38:38 +0200 |
commit | 574c042a56ddf4a9dfc62767de438391ca8479a1 (patch) | |
tree | a97f3b55dd0a5ee16d3d31ee9ae2b1a1131cf6a4 /lib | |
parent | remove users* methods; add description to all methods (diff) | |
download | net-backtype-574c042a56ddf4a9dfc62767de438391ca8479a1.tar.gz |
add two new methods to backtweet
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Net/Backtweet.pm | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/lib/Net/Backtweet.pm b/lib/Net/Backtweet.pm index 9ca8b1e..9eec20b 100644 --- a/lib/Net/Backtweet.pm +++ b/lib/Net/Backtweet.pm @@ -1,16 +1,19 @@ package Net::Backtweet; -use Moose; +# ABSTRACT: client for the backtweet API + use MooseX::Net::API; extends 'Net::Backtype'; net_api_declare backtweet => ( - base_url => 'http://backtweets.com', + base_url => 'http://api.backtype.com', format => 'json', format_mode => 'append', ); net_api_method backtweet_search => ( + description => + 'Retrieve tweets that link to a given URL, whether the links are shortened or unshortened.', path => '/search', method => 'GET', params => [qw/q since key end start itemsperpage/], @@ -18,12 +21,27 @@ net_api_method backtweet_search => ( expected => [qw/200/], ); -1; -__END__ +net_api_method stats_by_url => ( + description => + 'Retrieve the number of tweets that link to a particular URL.', + path => '/tweetcount', + method => 'GET', + params => [qw/q batch key/], + required => [qw/q key/], + expected => [qw/200/], +); -=head1 NAME +net_api_method good_tweets_by_url => ( + description => + 'Retrieve filtered tweets that link to a given URL with both shortened and unshortened links. This returns a subset of Tweets by URL.', + path => '/goodtweets', + method => 'GET', + params => [qw/q key/], + required => [qw/q key/], + expected => [qw/200/], +); -Net::Backtweet - client for the backtweet API +1; =head1 SYNOPSIS @@ -41,23 +59,10 @@ Net::Backtype is a client for the backtweet API. =item B<backtweet_search> -See L<http://backtweets.com/api>. - -=back - -=head1 AUTHOR - -franck cuny E<lt>franck@lumberjaph.netE<gt> +=item B<stats_by_url> -=head1 SEE ALSO +=item B<good_tweets_by_url> -=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. +=back -=cut +See L<http://backtweets.com/api> for more information about the backtweets API. |