-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add query parameters to get information for the latest release of a distribution #9
Comments
Hi, I'm wondering about "It can't be limit because that should limit the total number of responses, not the responses for each distribution". Maybe I'm missing something*, but isn't "the total number of responses" the same as the responses for a dist, if you have requested *(i.e., a way to request more than one but less than all dists) Unless you mean that want to be able to request all dists but only up to a max limit per dist, and also be able to limit the total number of responses ... then it should be a separate param, I suggest |
The Especially when it comes to |
Hi @preaction do you want support for |
Nah, I think you're right: It's the default, so there's no need to explicitly do it. Each constraint is layered on the previous. If they don't want to constrain, they don't need to declare "I want all things". They can declare it explicitly by not declaring it ;) |
Hey @preaction, |
The
release
API gets information rolled-up by distribution and version into a simple set of pass/fail/na/unknown statistics. By default, this gives information for every single release of every single distribution, which is good for sites like http://metacpan.org (which this API was initially designed for) but bad for other kinds of consumption.So, to all the
release
API endpoints (/v3/release
,/v3/release/dist/:dist
,/v3/release/author/:author
) we should add two new query parameters:maturity
andper_dist
.For
maturity
, the value can be eitherstable
, which limits the results returned to only the stable releases of the distribution, ordev
, which limits the results returned to only development releases of the distribution. The default behavior is to get all releases of a distribution (maturity=any
).For
per_dist
, the value is an integer that will limit how many versions of each distribution will be returned. The default behavior is to get all versions of a distribution.The combined result of these two parameters means that setting
?per_dist=1&maturity=stable
will get you a report of only the latest stable release of the distribution(s).For example, given a distribution
Foo
released byFIZZBUZZ
, with versions1.0
,1.000_001
(a dev version), and1.1
, and a distributionBar
released byFIZZBUZZ
with versions20170101
, and20170205-TRIAL
:/v3/release/dist/Foo?maturity=stable
will return the information for releases1.0
and1.1
./v3/release/dist/Foo?maturity=stable&per_dist=1
will return the information for release1.1
./v3/release/dist/Foo?maturity=dev
will return the information for release1.000_001
./v3/release/author/FIZZBUZZ?maturity=stable&per_dist=1
will return information for[email protected]
andBar@20170101
/v3/release/author/FIZZBUZZ?per_dist=1
will return information for[email protected]
andBar@20170205-TRIAL
/v3/release?maturity=dev&per_dist=1
will return information for[email protected]_001
andBar@20170205-TRIAL
Questions:
per_dist
okay? Is there a better name? Justper
?each
?results_per_dist
?limit
because that should limit the total number of responses, not the responses for each distribution./v3/release/dist/Foo
allowper_dist
? Or should it just be namedlimit
for this endpoint?The text was updated successfully, but these errors were encountered: