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

JSON package meta-data is not specified #29

Open
htgoebel opened this issue Jul 10, 2020 · 1 comment
Open

JSON package meta-data is not specified #29

htgoebel opened this issue Jul 10, 2020 · 1 comment

Comments

@htgoebel
Copy link

The JSON data (application/vnd.hex+json) delivered by

is not documented.

While most of the fields delivered can be guessed, some are not obvious. Some examples:

  • (package url vs. html_url vs doc_html_url
  • (package) meta -> elixir
  • (release) meta -> app
  • (release) meta -> elixir (also: what does null mean here)
  • (release) inserted_at vs.updated_at
  • (release) url vs. html_url (seems to be the same in many cases)

Beside a description of the fields, it would be nice to have a specification one can rely on.

(FYI: I'm building a importer from hex.pm packages into guix, for which I need to query this data.)

@ericmj
Copy link
Member

ericmj commented Jul 10, 2020

See https://github.com/hexpm/specifications/blob/master/apiary.apib#L400 and https://github.com/hexpm/specifications/blob/master/apiary.apib#L471.

Some fields are not documented for every resource because they are following conventions or assume some knowledge about elixir and hex.

You can find information about the package metadata here: https://github.com/hexpm/specifications/blob/master/package_metadata.md.

  • url is the URL to the currently described resource.
  • html_url is the URL to the hex.pm website of the current resource.
  • doc_html_url is the URL to the website page for the package documentation.
  • inserted_at when the resource was created
  • updated_at when the resource was last updated

If you feel anything is missing in the HTTP API docs please send pull requests that fill in the missing information as you learn more. Thank you.

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

No branches or pull requests

2 participants