UNLV-CS472-672 / 2024-S-GROUP5-Munch

The Munch app is a social platform where users create profiles by selecting preferred foods.
1 stars 11 forks source link

Adjust yelp API for latitude and longitude #83

Closed tadakane closed 5 months ago

tadakane commented 5 months ago

Description / Changes Made

Portions of this code that utilized AI generation

None

How to Test

  1. Using Postman, use endpoint api/<latitude>/<longitude>
  2. Set Postman to a GET method.
  3. Before sending request, w/o middleware, you only need to make sure in the Headers tab on Postman to have a Key "Authorization", then Value as "Bearer ". The YELP_API_KEY can be obtained at https://www.yelp.com/developers/v3/manage_app. Login with the Munch Google account. Make sure to put the yelp key in the .env file of the backend as YELP_API_KEY=<yelp key>. With middleware, you need another Header also "Authorization", then value as "Bearer <user token>. If you are using middleware, make sure the user token authorization is listed first in the headers.
  4. Now, send request and you should be getting the JSON with the fields we want from yelp.

Checklist