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

Domestic address javascript component autocomplete #72 #75 [TGER-140] #90

Conversation

devjk1
Copy link
Contributor

@devjk1 devjk1 commented Mar 23, 2021

** do not TEST or merge, I need to add session tokens.

Need a test environment.

@devjk1 devjk1 requested review from joshtorres and phuclh March 23, 2021 19:05
@drewroberts drewroberts requested a review from kylebarney March 24, 2021 01:21
@drewroberts
Copy link
Member

@kylebarney When you get a chance, could you make sure this is implementing the Google Places Autocomplete (TIPOFF/laravel-google-api#18) as you had in mind with the tipoff/laravel-google-api package?

@devjk1
Copy link
Contributor Author

devjk1 commented Mar 25, 2021

https://developers.google.com/maps/documentation/places/web-service/autocomplete

In the example of the JSON response, the JSON object -> predictions -> terms, the address is split into terms/parts.
If the parts are split consistently, then I can move on to extracting street address, city, state, etc... then saving as a Model.
Unfortunately the example does not show a response where types=address, and we need a test environment to move further.

@drewroberts drewroberts marked this pull request as draft March 26, 2021 11:49
Copy link
Contributor

@kylebarney kylebarney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drewroberts To your question on this PR earlier this week, this code is using a client-side implementation rather than the server-side one that is included in the package that I pulled into laravel-google-api. If we wanted to go the server-side route, we would need to send a call to our own server and have that proxy through to the Places API like so: (app()->make(\SKAgarwal\GoogleApi\PlacesApi::class))->placeAutocomplete('query-input');

That being said, either approach will work. The client-side approach would make for a snappier experience, possibly at the expense of a little extra cost and less protection against abuse of the API key. The server-side could take a bit longer to respond since it is being proxied, but we could add rate-limiting if the number of requests/spamming is a concern.

@drewroberts drewroberts marked this pull request as ready for review March 30, 2021 03:02
@drewroberts
Copy link
Member

Thank you, @kylebarney. Let's stick with this implementation then and we can refactor later if necessary to have rate-limiting functionality.

@drewroberts drewroberts marked this pull request as draft March 30, 2021 03:05
@devjk1
Copy link
Contributor Author

devjk1 commented Apr 2, 2021

Please delete/don't merge this PR. I created a new PR to replace this.

@drewroberts drewroberts closed this Apr 2, 2021
@drewroberts drewroberts deleted the omnia/feature/72_75_domestic_address_javascript_component_autocomplete branch April 2, 2021 20:04
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

Successfully merging this pull request may close these issues.

3 participants