summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Net/Backtype.pm138
1 files 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<user_comment>
-
-See L<http://www.backtype.com/developers/user-comments>.
-
-=item B<user_followers>
-
-See L<http://www.backtype.com/developers/user-followers>.
-
-=item B<user_following>
-
-See L<http://www.backtype.com/developers/user-following>.
-
-=item B<user_home>
-
-See L<http://www.backtype.com/developers/user-home-feed>.
-
-=item B<user_profile>
-
-See L<http://www.backtype.com/developers/user-profile>.
-
 =item B<comments_search>
 
+Search all the comments on BackType for a given string.
+
 See L<http://www.backtype.com/developers/comments-search>.
 
 =item B<comments_connect>
 
+Retrieve all conversations related to a given URL.
+
 See L<http://www.backtype.com/developers/comments-connect>.
 
 =item B<comments_connect_stats>
 
+Retrieve statistics on the conversations related to a given URL.
+
 See L<http://www.backtype.com/developers/comments-connect-stats>.
 
 =item B<comments_author>
 
+Retrieve comments written by a particular author.
+
 See L<http://www.backtype.com/developers/url-comments>.
 
 =item B<comments_page>
 
+Retrieve excerpts of comments published on a particular page.
+
 See L<http://www.backtype.com/developers/page-comments>.
 
 =item B<comments_page_stats>
 
-See L<http://www.backtype.com/developers/page-comments-stats>.
-
-=back
-
-=head1 AUTHOR
+Retrieve statistics for the comments published on a particular page.
 
-franck cuny E<lt>franckcuny@lumberjaph.netE<gt>
+See L<http://www.backtype.com/developers/page-comments-stats>
 
-=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