Net::Backtype - client for the backtype API


Net-Backtype documentation Contained in the Net-Backtype distribution.

Index


Code Index:

NAME

Top

Net::Backtype - client for the backtype API

VERSION

Top

version 0.03

SYNOPSIS

Top

  use Net::Backtype;
  my $client = Net::Backtype->new();
  my $res = $client->comments_page(url => 'http://...', key => $mykey);

DESCRIPTION

Top

Net::Backtype is a client for the backtype API

METHODS

comments_search

Search all the comments on BackType for a given string.

    my $res = $client->comments_page(key => 's3kr3t', q => 'lumberjaph' );

q query (required)
key API key (required)
start date start (optional)
end date end (optional)

See http://www.backtype.com/developers/comments-search.

comments_connect

Retrieve all conversations related to a given URL.

    my $res = $client->comments_connect(key => 's3kr3t', url => 'lumberjaph');

url url (required)
key API key (required)
sources (optional)
sort (optional)

See http://www.backtype.com/developers/comments-connect.

comments_connect_stats

Retrieve statistics on the conversations related to a given URL.

    my $res = $client->comments_connect_stats(url => 'lumberjaph', key => 's3kr3t');

url url (required)
key API key (required)

See http://www.backtype.com/developers/comments-connect-stats.

comments_author

Retrieve comments written by a particular author.

    my $res = $client->comments_author(url => 'lumberjaph', key => 's3kr3t');

url url (required)
key API key (required)

See http://www.backtype.com/developers/url-comments.

comments_page

Retrieve excerpts of comments published on a particular page.

    my $res = $client->comments_page_stats(url => 'lumberjaph', key => 's3kr3t');

url url (required)
key API key (required)

See http://www.backtype.com/developers/page-comments.

comments_page_stats

Retrieve statistics for the comments published on a particular page.

See http://www.backtype.com/developers/page-comments-stats

AUTHOR

Top

  franck cuny <franck@lumberjaph.net>

COPYRIGHT AND LICENSE

Top


Net-Backtype documentation Contained in the Net-Backtype distribution.

package Net::Backtype;

# ABSTRACT: client for the backtype API

use Net::HTTP::API;

our $VERSION = '0.03';

net_api_declare backtype => (
    base_url    => 'http://api.backtype.com',
    format      => 'json',
    format_mode => 'append',
);

net_api_method comments_search => (
    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 => (
    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 => (
    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__