Skip to content

Commit

Permalink
Merge pull request #1 from dandv/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed Dec 7, 2011
2 parents d00e28c + 7da1a14 commit b7d826f
Showing 1 changed file with 61 additions and 58 deletions.
119 changes: 61 additions & 58 deletions lib/Net/Topsy/Role/API.pm
Expand Up @@ -2,118 +2,121 @@ package Net::Topsy::Role::API;

use Moose::Role;

my %list_parameters = (
page => 0,
perpage => 0,
offset => 0,
mintime => 0,
maxtime => 0,
nohidden => 0,
allow_lang => 0,
family_filter => 0,
);

has API => ( isa => 'HashRef', is => 'ro', default => sub {
{
'http://otter.topsy.com' => {
'/search' => {
args => {
q => 1,
window => 0,
page => 0,
perpage => 0,
},
},
'/searchcount' => {
args => {
q => 1,
},
},
'/profilesearch' => {
'/authorinfo' => {
args => {
q => 1,
page => 0,
perpage => 0,
url => 1,
},
},
'/authorsearch' => {
'/experts' => {
args => {
q => 1,
window => 0,
page => 0,
perpage => 0,
config_NoFilters => 0,
%list_parameters
},
},
'/stats' => {
'/linkposts' => {
args => {
url => 1,
contains => 0,
contains => 0,
tracktype => 0,
%list_parameters
},
},
'/tags' => {
'/linkpostscount' => {
args => {
url => 1,
page => 0,
perpage => 0,
contains => 0,
tracktype => 0,
},
},
'/authorinfo' => {
'/populartrackbacks' => {
args => {
url => 1,
%list_parameters
},
},
'/urlinfo' => {
'/search' => {
args => {
url => 1,
q => 1,
window => 0,
type => 0,
query_features => 0,
%list_parameters
},
},
'/linkpostcount' => {
'/searchcount' => {
args => {
url => 1,
contains => 0,
q => 1,
dynamic => 0,
},
},
'/linkposts' => {
'/searchhistogram' => {
args => {
url => 1,
contains => 0,
page => 0,
perpage => 0,
q => 1,
slice => 0,
period => 0,
count_method => 0,
},
},
'/toplinkcount' => {
'/searchdate' => {
args => {
contains => 0,
page => 0,
perpage => 0,
q => 1,
window => 0,
type => 0,
zoom => 0,
},
},
'/toplinks' => {
'/stats' => {
args => {
contains => 0,
page => 0,
perpage => 0,
url => 1,
contains => 0,
},
},
'/trending' => {
'/top' => {
args => {
page => 0,
perpage => 0,
thresh => 1,
type => 0,
locale => 0,
%list_parameters
},
},
'/credit' => {
'/tags' => {
args => {
url => 1,
%list_parameters
},
},
'/trackbacks' => {
args => {
url => 1,
contains => 0,
infonly => 0,
page => 0,
perpage => 0,
sort_method => 0,
%list_parameters
},
},
'/related' => {
'/trending' => {
args => {
url => 1,
page => 0,
perpage => 0,
%list_parameters
},
},
'/trackbackcount' => {
'/urlinfo' => {
args => {
url => 1,
contains => 0,
url => 1,
},
},
},
Expand Down

0 comments on commit b7d826f

Please sign in to comment.