Permalink
Browse files

Use /author/by_ids API endpoint

Replace query sending with a call to the new API endpoint.
  • Loading branch information...
1 parent 4f92ac7 commit db7da2e260de3a1af19aa8122dc24c5a6df1a30d @mickeyn mickeyn committed Jul 1, 2017
Showing with 1 addition and 12 deletions.
  1. +1 −12 lib/MetaCPAN/Web/Model/API/Author.pm
@@ -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 {

0 comments on commit db7da2e

Please sign in to comment.