I’m trying to connect with Google Maps API and make requests for place details specifically. It says I need to make a call to the getDetails() method but I am not sure how to do that. Although I’m great at the templating part of Ember, I’m not great at writing code that allows for making calls to APIs.
Here’s a little context: I’m working on a side project that allows people to search for restaurants based off of a profile that is created. The first stage of it is to be able to implement a simple google search. I have a card layout that I would like to populate with specific data from the API. I hope someone here can help! If I need to clarify more, please let me know
Whenever you want to use some library that expects to have its HTML elements already in the page before you start calling functions, you can put the HTML into a component’s template and call the API functions from the components’ didInsertElement.
I would suggest starting here and looking through the next several examples to find one that has aspects of what you’re trying to build, and take that code and get it working in your app, using the strategy I outlined above (HTML in a component’s template, Javascript in the component’s didInsertElement). First get their example working as is, then move on to adding the things you want for your app, and ask again when you hit a specific question.