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

Improve return format of places-in #387

Open
tjann opened this issue Dec 9, 2020 · 0 comments
Open

Improve return format of places-in #387

tjann opened this issue Dec 9, 2020 · 0 comments

Comments

@tjann
Copy link
Contributor

tjann commented Dec 9, 2020

The current /node/places-in return format is like

[{\"dcid\":\"geoId/06\",\"place\":\"geoId/06001\"},{\"dcid\":\"geoId/06\",\"place\":\"geoId/06003\"}...{\"dcid\":\"geoId/04\",\"place\":\"geoId/04005\"},{\"dcid\":\"geoId/04\",\"place\":\"geoId/04007\"}]

I'd expected something more like what we have for Python:

{
  'geoId/06': [
    'geoId/06001',
    'geoId/06003',
    'geoId/06005',
    'geoId/06007',
    'geoId/06009',
    ...
  ],
  'geoId/04': [
    'geoId/04005',
    'geoId/04007',
    ...
  ]
}

I chatted offline with @shifucun , who said the REST return format is an old design decision. He proposed adding a new API /place/contained?dcids=... and slowly deprecate /node/places-in.

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

1 participant