Skip to content

Add preferred package JSON format handler #374

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

Merged
merged 2 commits into from
Jul 12, 2015

Conversation

potomak
Copy link
Contributor

@potomak potomak commented Jun 6, 2015

Example response:

{
  "deprecated-version": ["0.1.0"],
  "unpreferred-version": ["0.2.0"],
  "normal-version": ["0.3.0", "0.3.1"]
}

Example response:

    {
      "deprecated-version": ["0.1.0"],
      "unpreferred-version": ["0.2.0"],
      "normal-version": ["0.3.0", "0.3.1"]
    }
@hvr
Copy link
Member

hvr commented Jun 6, 2015

This is almost what I need for hackage-cli (and other tooling I'm working on) to avoid scraping the package content HTML page... :)

...have you seen #338? I don't think we need to split up all information provided in /package/:package into several micro-endpoints. I'd rather expect an /package/:package.:format endpoint providing more information; For instance, I need to know for each single version what the highest x-revision is, as well when the tarball was uploaded, whether a documentation tarball is available. Splitting that information into several sub-endpoints would require a lot of HTTP GET traffic to reconstruct what /package/:package.html already provides now...

@hvr
Copy link
Member

hvr commented Jun 6, 2015

PS: I'm not saying that this endpoint shouldn't become JSON aware, since it's just an enhancement of an existing one...

@potomak
Copy link
Contributor Author

potomak commented Jun 6, 2015

@hvr I agree, and yes, maybe this could just be another format of the resource /package/:package/preferred waiting for an implementation of the handler that responds to /package/:package JSON requests.

@potomak
Copy link
Contributor Author

potomak commented Jun 8, 2015

What do you think about adding this handler to the preferred versions feature, to support the JSON format @gracenotes?

dcoutts added a commit that referenced this pull request Jul 12, 2015
Add preferred package JSON format handler
@dcoutts dcoutts merged commit 5fe9a93 into haskell:master Jul 12, 2015
@dcoutts
Copy link
Contributor

dcoutts commented Jul 12, 2015

@potomak @hvr yes, providing a .json at the main package page is a good idea, but a bigger undertaking. I'm happy to merge this as is for now.

@potomak
Copy link
Contributor Author

potomak commented Jul 12, 2015

@dcoutts thanks. How can I get notified about the deployment of this feature?

@dcoutts
Copy link
Contributor

dcoutts commented Jul 13, 2015

@potomak missed the deployment window yesterday, but aiming to do it this evening instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants