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

pip_verbose: add support for lang query parameter #79

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

Joxit
Copy link
Member

@Joxit Joxit commented Sep 1, 2022

Background

I was looking for inspiration to replace my PR #75 and found this API which seems to have a good base to be used as the default API (/query/pip/verbose).

I know that we have some issue with multi-lang and autocomplete (see pelias/api#1296), having parent members in a defined language may help those who need autocomplete to work in a different lang than English.

What's new ?

I added a query parameter lang that accept iso 6391 (2 chars) and iso 6393 (3 chars) codes. Instead of using und lang it will return the requested language.
The name uses will not be in aliases when selected.

Small example from a request in France using Dutch /query/pip/verbose?lon=2.344576377568282&lat=48.876457644366816&lang=nl

{
"country": [
    {
      "id": "85633147",
      "source": "wof",
      "name": "Frankrijk",
      "abbr": "FRA",
      "centroid": {
        "lat": 46.7153185,
        "lon": 2.1843152
      },
      "bounding_box": "-61.797841,-21.370782,55.854503,51.089382"
    }
  ],
  "localadmin": [
    {
      "id": "1159322569",
      "source": "wof",
      "name": "Parijs",
      "centroid": {
        "lat": 48.8590265,
        "lon": 2.3200487
      },
      "bounding_box": "2.224225,48.815607,2.469769,48.902008"
    }
  ]
}

closes #75

@Joxit Joxit force-pushed the feat/joxit/pip_verbose-lang branch from a193e3f to 7e96c36 Compare September 1, 2022 13:01
@Joxit Joxit merged commit 5c5d679 into master Oct 24, 2022
@Joxit Joxit deleted the feat/joxit/pip_verbose-lang branch October 24, 2022 13:25
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.

1 participant