-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Control Google places search API price #1461
Conversation
language: query.language || configuration.language | ||
} | ||
end | ||
|
||
def fields(query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default every fields are requested, to prevent any regression from developers already using the gem.
end | ||
|
||
def default_fields | ||
legacy = %w[id reference] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id
and reference
fields were already available in the previous API response (Text search response), I added those 2 fields here to prevent any regression for developers already using the gem
@alexreisner this PR is ready for review 👍 |
This looks great! Thanks for preserving the existing behavior, even if it's not the most cost-effective. My only question is whether we need to add the |
It's actually being used in the method body, here: https://github.com/alexreisner/geocoder/pull/1461/files#diff-ec56420a19546fb7982cb25cfcc5bc52R51. |
Sorry, my comment wasn't clear. What I don't see is any code that calls As for separate refactoring PR, sounds good. And if that PR would take advantage of this second |
Thanks for the clarification 👍 After quickly checking the components inheriting from
The def results(query)
super(query, 'candidates')
end |
That sounds like a good plan to me! |
I just made the changes, it's ready for review again. Don't hesitate if anything is unclear. |
Perfect! Thanks for the good work on this. |
References issue: #1460