krishnaglick / MEEQS_Old2

0 stars 1 forks source link

Backend << Google Places API #16

Closed krishnaglick closed 9 years ago

krishnaglick commented 9 years ago

Restaurant Locations should pull back Google data.

CygnusRoboticus commented 9 years ago

This doesn't appear to be in-line with other api endpoints, compare what it returns to what 'users' return.

Google data takes priority, so don't include it on the restaurantLocation object. I think including the google data as individual objects and then adding restaurantLocation properties is a better approach, i.e.

{ "restaurantLocations": [ { "google fields lol": google data lol, "restaurantLocationID": null (or just not present, either works) }, { "google fields lol": google data lol, "restaurantLocationID": 1, "restaurant location fields": whatever gurl } ] }

krishnaglick commented 9 years ago

Pusged up, waiting on Josh to get back to me.

CygnusRoboticus commented 9 years ago

Currently shits the bed when called with a querystring, but otherwise works. One small issue with the 'restaurantLocationID', but that should be handled on the frontend.

e.g. /api/v1/restaurantLocations - 200 /api/v1/restaurantLocations?keyword=asdf - 500 /api/v1/restaurantLocations?anything=&whatever=asdf - 500

Query params are subject to change.

krishnaglick commented 9 years ago

Frontend location cookie needs to be named 'location', not 'locations'. Cookie will override url param. Fix pushed up.

CygnusRoboticus commented 9 years ago

Frontend cookie has always been named 'location' and will continue to be into the future. With most recent changes, no restaurantLocations are retrieved with or without a querystring. Ensured I had a location cookie while testing.

krishnaglick commented 9 years ago

Should all be working and fixed!