newtonjain / hacktheplanet

BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Scenic Trips [All Users] [Yelp] #10

Open aleccool213 opened 9 years ago

aleccool213 commented 9 years ago

POST to trip_api is made by the Customer (the request to book the ride)

{
<trip_object>
}

Response on 200:

{
<trip_object WITH MORE DESTINATIONS AND SHIT>
}

image

@theshteves you were working on this sort of, lets discuss the implementation here

aleccool213 commented 9 years ago
theshteves commented 9 years ago

Right, so I successfully fixed some bugs on the algorithm I was working on during the train ride home. It returns the proper order in which destinations should be visited.

For parameters, it accepts a nested list- that is, a list of lat-long lists so for example "[[3, 3], [1, 2], [0, 0], [2, -1], [3, 4], [5, 5]]". IMPORTANT: the first and last lists are assumed endpoints. The function returns a similar list of lat-long lists except in a desired order.

I'm gonna upload it in a "order.py," where do you want it?

aleccool213 commented 9 years ago

@theshteves any utility function should be done in a utils.py function and it is related to bmw model classes so put it in that app

aleccool213 commented 9 years ago

personally if we actually get it implementing i will be surprised because it seems like we will need to test this extensively

aleccool213 commented 9 years ago

turns out it was an issue with the parameters of searching for yelp, made the radius like 100 and added more categories. this is finicky so i am tempted to just add a fucking ton of categories so we always get results of random shit