GregStephen / poop-scoop

0 stars 0 forks source link

Yelp Api Setup #10

Closed GregStephen closed 5 years ago

GregStephen commented 5 years ago

User Story

As a user when I search a term, I should come up with a list of names of business near my location

AC

WHEN the user types in a term such as "pizza" THEN a list of pizza places near by should populate under the search bar

Development

GregStephen commented 5 years ago

code for the axios call

(`${'https://cors-anywhere.herokuapp.com/'}https://api.yelp.com/v3/businesses/search`,
    {
      headers: {
        Authorization: `Bearer ${yelpKey.YelpKeys.apiKey}`,
      },
      params: {
        term: search,
        latitude,
        longitude,
      },
    })