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

Make output format more consistent #5

Open
wvengen opened this issue Apr 6, 2020 · 0 comments
Open

Make output format more consistent #5

wvengen opened this issue Apr 6, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@wvengen
Copy link
Member

wvengen commented Apr 6, 2020

When it is unknown whether the fish was caught or raised using aquaculture, the output format is unsuitable. This was encountered with the flat parser, which may return methods and areas (instead of catch_areas, catch_methods, aquaculture_areas and aquaculture_methods).

It would be clearer to use the following output format:

[
  {
    :names =>   [{ :common=>"Alaska pollakfilet", :latin=>nil }],
    :areas =>   [{ :text=>"de Stille Oceaan", :fao_codes=>[]}],
    :methods => [],
    :kind =>    "caught",
  },
]

This would have the following benefits:

Note that this breaks the API, requiring a major version bump.

@wvengen wvengen added the enhancement New feature or request label Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant