Skip to content
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

x/website/internal/dl: expand JSON download mode to optionally return archive and unstable releases also #29380

Closed
johnweldon opened this issue Dec 21, 2018 · 6 comments
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@johnweldon
Copy link

johnweldon commented Dec 21, 2018

Issue

The PR that resolved #23746 provided a nice JSON response on the download page https://golang.org/dl/?mode=json

However, this only provides for stable releases.

I would like to consume unstable and archive release metadata as JSON also.

Proposal

I'd like to modify https://github.com/golang/tools/blob/4d6773f/godoc/dl/server.go#L80-L88 to add a query param to include archive or unstable releases optionally.

I'm thinking https://golang.org/dl/?mode=json[&include=(all|stable|unstable|archive)]

When the include param is absent, it would default to stable which is the current behaviour already.

@gopherbot gopherbot added this to the Unreleased milestone Dec 21, 2018
@agnivade agnivade added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. FeatureRequest Issues asking for a new feature that does not need a proposal. labels Dec 23, 2018
@agnivade
Copy link
Contributor

/cc @andybons @dmitshur

@andybons
Copy link
Member

Why not just all and stable as options? Is there a specific need for the level of granularity you specify?

@johnweldon
Copy link
Author

johnweldon commented Dec 23, 2018

All I personally need is all. Since we'd be changing the code anyway, we may want to add some query param options for other use cases but maybe that's YAGNI

@andybons
Copy link
Member

I’m down for an all option. We can expand if needed.

@andybons andybons added help wanted NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Dec 24, 2018
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/155740 mentions this issue: x/tools/godoc/dl: enhance JSON download with "all" option

@johnweldon johnweldon changed the title x/tools/godoc/dl: expand JSON download mode to optionally return archive and unstable releases also x/website/internal/dl: expand JSON download mode to optionally return archive and unstable releases also Feb 26, 2019
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/163741 mentions this issue: internal/dl: enhance JSON download with include=all option

@golang golang locked and limited conversation to collaborators Apr 23, 2020
MK825 added a commit to MK825/website that referenced this issue Oct 18, 2022
This change adds an optional query parameter, include=all, to the
https://godoc.org/dl/?mode=json endpoint. When this parameter is set
the returned JSON will include metadata for Stable, Archive, and
Unstable downloads, rather than the default which only lists Stable.

Fixes golang/go#29380

Change-Id: Id51e839919df9dd967d2f11ba0658f51f61b6d1b
Reviewed-on: https://go-review.googlesource.com/c/website/+/163741
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants