diff --git a/lib/MetaCPAN/Web/Model/API/Rating.pm b/lib/MetaCPAN/Web/Model/API/Rating.pm deleted file mode 100644 index 4f6dc93520..0000000000 --- a/lib/MetaCPAN/Web/Model/API/Rating.pm +++ /dev/null @@ -1,41 +0,0 @@ -package MetaCPAN::Web::Model::API::Rating; -use Moose; -use namespace::autoclean; -use Future (); - -extends 'MetaCPAN::Web::Model::API'; - -=head1 NAME - -MetaCPAN::Web::Model::Rating - Catalyst Model - -=head1 DESCRIPTION - -Catalyst Model. - -=head1 AUTHOR - -Moritz Onken, Matthew Phillips - -=head1 LICENSE - -This library is free software. You can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut - -sub get { - my ( $self, $dist ) = @_; - - return $self->request( '/rating/by_distributions', - { distribution => $dist } )->then( sub { - my $data = shift; - my $dists = delete $data->{distributions}; - $data->{rating} = $dists->{$dist}; - Future->done($data); - } ); -} - -__PACKAGE__->meta->make_immutable; - -1; diff --git a/lib/MetaCPAN/Web/Model/ReleaseInfo.pm b/lib/MetaCPAN/Web/Model/ReleaseInfo.pm index 097d468495..6739a66302 100644 --- a/lib/MetaCPAN/Web/Model/ReleaseInfo.pm +++ b/lib/MetaCPAN/Web/Model/ReleaseInfo.pm @@ -19,7 +19,6 @@ my %models = ( _author => 'API::Author', _contributors => 'API::Contributors', _changes => 'API::Changes', - _rating => 'API::Rating', _favorite => 'API::Favorite', _permission => 'API::Permission', ); @@ -78,7 +77,6 @@ sub _fetch { return ( [ favorites => $self->_favorite->by_dist($dist) ], [ plussers => $self->_favorite->find_plussers($dist) ], - [ rating => $self->_rating->get($dist) ], [ versions => $self->_release->versions($dist) ], [ distribution => $self->_distribution->get($dist) ], );