From 453e8fac1f0c559ef62e64de99cb6c3e297c1a66 Mon Sep 17 00:00:00 2001 From: franck cuny Date: Mon, 7 Jun 2010 09:38:27 +0200 Subject: remove users* methods; add description to all methods --- lib/Net/Backtype.pm | 138 +++++++++++++++++----------------------------------- 1 file changed, 44 insertions(+), 94 deletions(-) diff --git a/lib/Net/Backtype.pm b/lib/Net/Backtype.pm index 1c507c3..30b1784 100644 --- a/lib/Net/Backtype.pm +++ b/lib/Net/Backtype.pm @@ -1,9 +1,10 @@ package Net::Backtype; -use Moose; +# ABSTRACT: client for the backtype API + use MooseX::Net::API; -our $VERSION = '0.01'; +our $VERSION = '0.02'; net_api_declare backtype => ( base_url => 'http://api.backtype.com', @@ -11,90 +12,64 @@ net_api_declare backtype => ( format_mode => 'append', ); -net_api_method user_comments => ( - path => '/user/$user/comments', - method => 'GET', - params => [qw/key user/], - required => [qw/key user/], - expected => [qw/200/], -); - -net_api_method user_followers => ( - path => '/user/$user/followers', - method => 'GET', - params => [qw/key user/], - required => [qw/key user/], -); - -net_api_method user_following => ( - path => '/user/$user/following', - method => 'GET', - params => [qw/key user/], - required => [qw/key user/], -); - -net_api_method user_home => ( - path => '/user/$user/home/comments', - method => 'GET', - params => [qw/key user/], - required => [qw/key user/], -); - -net_api_method user_profile => ( - path => '/user/$user/profile', - method => 'GET', - params => [qw/key user/], - required => [qw/key user/], -); - net_api_method comments_search => ( - path => '/comments/search', - method => 'GET', - params => [qw/key q start end/], - required => [qw/key q/], + description => 'Search all the comments on BackType for a given string.', + path => '/comments/search', + method => 'GET', + params => [qw/key q start end/], + required => [qw/key q/], + expected => [qw/200/], ); net_api_method comments_connect => ( - path => '/comments/connects', - method => 'GET', - params => [qw/key url sources sort/], - required => [qw/url key/], + description => 'Retrieve all conversations related to a given URL.', + path => '/comments/connects', + method => 'GET', + params => [qw/key url sources sort/], + required => [qw/url key/], + expected => [qw/200/], ); net_api_method comments_connect_stats => ( + description => + 'Retrieve statistics on the conversations related to a given URL.', path => '/comments/connect/stats/', method => 'GET', params => [qw/key url/], required => [qw/url key/], + expected => [qw/200/], ); net_api_method comments_author => ( - path => '/url/$url/comments', - method => 'GET', - params => [qw/key url/], - required => [qw/key url/], + description => 'Retrieve comments written by a particular author.', + path => '/url/:url/comments', + method => 'GET', + params => [qw/key url/], + required => [qw/key url/], + expected => [qw/200/], ); net_api_method comments_page => ( + description => + 'Retrieve excerpts of comments published on a particular page.', path => '/post/comments', method => 'GET', params => [qw/url key/], required => [qw/key url/], + expected => [qw/200/], ); net_api_method comments_page_stats => ( + description => + 'Retrieve statistics for the comments published on a particular page.', path => '/post/stats', method => 'GET', params => [qw/url key/], required => [qw/key url/], + expected => [qw/200/], ); 1; -__END__ - -=head1 NAME - -Net::Backtype - client for the backtype API =head1 SYNOPSIS @@ -106,69 +81,44 @@ Net::Backtype - client for the backtype API Net::Backtype is a client for the backtype API -=head2 METHODS +=head2 METHODS =over 4 -=item B - -See L. - -=item B - -See L. - -=item B - -See L. - -=item B - -See L. - -=item B - -See L. - =item B +Search all the comments on BackType for a given string. + See L. =item B +Retrieve all conversations related to a given URL. + See L. =item B +Retrieve statistics on the conversations related to a given URL. + See L. =item B +Retrieve comments written by a particular author. + See L. =item B +Retrieve excerpts of comments published on a particular page. + See L. =item B -See L. - -=back - -=head1 AUTHOR +Retrieve statistics for the comments published on a particular page. -franck cuny Efranckcuny@lumberjaph.netE +See L -=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. - -=cut +=back -- cgit 1.4.1