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

convert query parameters to objects #29

Open
Orlandster opened this issue Oct 3, 2017 · 0 comments
Open

convert query parameters to objects #29

Orlandster opened this issue Oct 3, 2017 · 0 comments

Comments

@Orlandster
Copy link
Owner

Let's take getLocationsByRadius() as an example. Currently the parameters get passed like this (center, radius, startAt = 1, endAt = undefined). This is pretty hard to understand for the user...

There should just be one object passed as parameter e.g.
getLocationsByRadius({ center: { lat: 1, lng: 1 }, radius: 5, startAt: 1, endAt: 2 })

All the validations and the tests need to be modified. (Just the way they get passed to the validators is important!)

@Orlandster Orlandster added this to the 1.0.0 milestone Oct 3, 2017
@Orlandster Orlandster self-assigned this Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant