Skip to content

Commit

Permalink
Use /author/by_ids API endpoint
Browse files Browse the repository at this point in the history
Replace query sending with a call to the new API endpoint.
  • Loading branch information
mickeyn committed Jul 4, 2017
1 parent 4f92ac7 commit db7da2e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions lib/MetaCPAN/Web/Model/API/Author.pm
Expand Up @@ -32,18 +32,7 @@ sub get {
return $self->request( '/author/' . uc( $author[0] ) )
if ( @author == 1 );

return $self->request(
'/author/_search',
{
query => {
constant_score => {
filter => { ids => { values => [ map {uc} @author ] } }
}
},
size => scalar @author,
}
);

return $self->request( '/author/by_ids', { id => \@author } );
}

sub search {
Expand Down

0 comments on commit db7da2e

Please sign in to comment.