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

[Feature] Print supported filter types to users #48

Open
OmarMuhammedAli opened this issue Jul 9, 2021 · 3 comments
Open

[Feature] Print supported filter types to users #48

OmarMuhammedAli opened this issue Jul 9, 2021 · 3 comments
Assignees
Labels
feature A feature request for the SDK

Comments

@OmarMuhammedAli
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A user may enter an unsupported filter when querying the SDK. Instead of just throwing an error, a list of supported filters should be logged to the user.

Describe the solution you'd like
A function that raises an exception in case of a wrong filter entry and prints out a list of supported filters by the Mapillary API v4

Describe alternatives you've considered
Instead of logging the whole list of supported filters, the function can print out a list of close matches to the user's input filter.

@OmarMuhammedAli OmarMuhammedAli added the feature A feature request for the SDK label Jul 9, 2021
@OmarMuhammedAli OmarMuhammedAli changed the title Feature [Feature] Print supported filter types to users Jul 9, 2021
@Rubix982
Copy link
Contributor

"...prints out a list of supported filters by the Mapillary API v4"

By this, do you mean that a high-level filter function should return a list of possible filters?

"... close matches to the user's input filter."

We can use the Levenshtein edit distance algorithm!

@cbeddow
Copy link
Member

cbeddow commented Jul 13, 2021

Using close matches/Levenshtein for this would be outstanding, far beyond what I think a typical open source library might do in an early stage! Most probably would just return "check filter and try again" with no other info. Having the suggestions would be a great way to keep users focused and help them make quick fixes. Cool idea.

@Rubix982
Copy link
Contributor

Yes! Finally, my knowledge about data structures and algorithms pays off! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature request for the SDK
Projects
Development

No branches or pull requests

3 participants