-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add categories to the places endpoint #1401
Conversation
Looks good to me. Can you add a little section to https://github.com/pelias/documentation/blob/master/place.md ? |
Heya, just checking that this implementation is consistent with how it's done in https://github.com/pelias/api/pull/1273/files#diff-4e1b6a181cc42ca3c8295245f9c4d63e? I see you added some |
@orangejulius : Okay for the section 👍 @missinglink : When you set the |
Agh yes I understand now :) It's probably something that I added actually, where the categories filter can also be used to control the display of categories, two totally different things. I think this has already complicated the use of the In the case of
I think in this case, because the The message could be something like this:
example query:
Sorry to be so picky, I just think I've already made it confusing enough I don't want to make it any more confusing for users 😄 |
Yes, you are right, a message for non empty categories makes sense 😄 An other solution would have been to always activate the categories for |
Yes I also considered just always showing categories for place. If we did that then we should really show all fields because otherwise I don't really see the value of One pro for that approach would be that the place API would have no params other than I'm actually fine with whichever solution, and I'm totally 100% for adding the ability to view categories in The question is more about API design and what makes the cleanest and most intuitive API for users? Julian is out for the Thanksgiving and I'd like to hear his opinion (and everyone elses too!), would you mind if we all had the weekend to think on it some more and merge this next week? |
Also the elephant in the room here is that the Another option is to finally adopt it as a first-class feature and expose it everywhere. |
I'm ok to have Julian's opinion 😄 Yes, displaying categories in all APIs may also be interesting and maybe more consistent ? Because categories are like addendum and they are always exposed. |
@Joxit sorry I refactored some code today and I seem to have caused a merge conflict 😦 on this branch. |
😿 |
Categories are something really useful (and interesting) that's why they should also be available in the Places API. This PR will add categories when we use the endpoint places e.g `/v1/places?categories&ids=...`
7a81375
to
4a69858
Compare
Updated 😉 |
Let's just go ahead and merge this as-is and we can discuss the idea of making categories "on by default" in another thread. |
Yeah ! 😄 🚀 |
Opened #1405 for the meta-discussion on categories. |
Categories are something really useful (and interesting) that's why they should also be available in the Places API.
This PR will add categories when we use the endpoint places e.g
/v1/places?categories&ids=...