Skip to content

Commit

Permalink
Create 2-all-versions-of-dist.pl
Browse files Browse the repository at this point in the history
Not fully tested - and should be against api-v1
  • Loading branch information
ranguard committed Jun 19, 2016
1 parent c51d807 commit c45eeb0
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions scripts/endpoints/distribution/2-all-versions-of-dist.pl
@@ -0,0 +1,33 @@
#!/usr/bin/env perl

use strict;
use warnings;

use Data::Printer;
use MetaCPAN::Util qw( es );

my $dist = $ARGV[0]

my $releases = es()->get(
index => 'v1',
type => 'release',
body =>
{
query => {
filtered => {
query => { match_all => {} },
filter => { term => { distribution => $dist } }
}
},
size => 1000,
sort => [ { date => 'desc' } ],
fields =>
[qw( download_url name date author version version_numified
status maturity authorized )],
}
);

p $releases;



0 comments on commit c45eeb0

Please sign in to comment.