Skip to content

Instantly share code, notes, and snippets.

@easherma
Last active June 30, 2016 18:47
Show Gist options
  • Save easherma/d3af20a2c89a9a20edee74f0be6f3eb9 to your computer and use it in GitHub Desktop.
Save easherma/d3af20a2c89a9a20edee74f0be6f3eb9 to your computer and use it in GitHub Desktop.
127.0.0.1 - - [30/Jun/2016 13:40:44] "POST /call HTTP/1.1" 200 -
127.0.0.1 - - [30/Jun/2016 13:45:17] "GET /static/js/lrm-mapzen-0.1.2/leaflet.routing.icons.png HTTP/1.1" 200 -
{'status': 'OK', 'main': 2, 'sub': [], 'user': 'default'}
127.0.0.1 - - [30/Jun/2016 13:45:17] "POST /getParams HTTP/1.1" 200 -
<type 'dict'>
{"status": "OK", "main": 2, "sub": [4], "user": "EASHERMA"}
<type 'str'>
Using: Factual
route [{u'lat': 41.81173, u'lng': -87.666227}, {u'lat': 42.03831, u'lng': -88.290742}]
BEGIN:
route [{u'lat': 41.81173, u'lng': -87.666227}, {u'lat': 42.03831, u'lng': -88.290742}]
apiout variables {'route': [{u'lat': 41.81173, u'lng': -87.666227}, {u'lat': 42.03831, u'lng': -88.290742}], 'results': [], 'out': []}
index, route_point
0 {u'lat': 41.81173, u'lng': -87.666227}
results so far:
0
sending call
range:
0
http://api.v3.factual.com/t/places?geo=%7B%22%24circle%22%3A+%7B%22%24center%22%3A+%5B41.81173%2C+-87.666227%5D%2C+%22%24meters%22%3A+25000%7D%7D&limit=50&filters=%7B%22%24and%22%3A+%5B%7B%22category_ids%22%3A+%7B%22%24includes_any%22%3A+%5B4%5D%7D%7D%2C+%7B%22chain_id%22%3A+%7B%22%24blank%22%3A+true%7D%7D%5D%7D&offset=0
Call successful! Records returned:
50
Total records
50
range:
1
http://api.v3.factual.com/t/places?geo=%7B%22%24circle%22%3A+%7B%22%24center%22%3A+%5B41.81173%2C+-87.666227%5D%2C+%22%24meters%22%3A+25000%7D%7D&limit=50&filters=%7B%22%24and%22%3A+%5B%7B%22category_ids%22%3A+%7B%22%24includes_any%22%3A+%5B4%5D%7D%7D%2C+%7B%22chain_id%22%3A+%7B%22%24blank%22%3A+true%7D%7D%5D%7D&offset=50
Call successful! Records returned:
50
Total records
100
index, route_point
1 {u'lat': 42.03831, u'lng': -88.290742}
results so far:
100
sending call
range:
0
http://api.v3.factual.com/t/places?geo=%7B%22%24circle%22%3A+%7B%22%24center%22%3A+%5B42.03831%2C+-88.290742%5D%2C+%22%24meters%22%3A+25000%7D%7D&limit=50&filters=%7B%22%24and%22%3A+%5B%7B%22category_ids%22%3A+%7B%22%24includes_any%22%3A+%5B4%5D%7D%7D%2C+%7B%22chain_id%22%3A+%7B%22%24blank%22%3A+true%7D%7D%5D%7D&offset=0
Call successful! Records returned:
50
Total records
150
range:
1
http://api.v3.factual.com/t/places?geo=%7B%22%24circle%22%3A+%7B%22%24center%22%3A+%5B42.03831%2C+-88.290742%5D%2C+%22%24meters%22%3A+25000%7D%7D&limit=50&filters=%7B%22%24and%22%3A+%5B%7B%22category_ids%22%3A+%7B%22%24includes_any%22%3A+%5B4%5D%7D%7D%2C+%7B%22chain_id%22%3A+%7B%22%24blank%22%3A+true%7D%7D%5D%7D&offset=50
Call successful! Records returned:
50
Total records
200
PARAMS
{'limit': 50, 'geo': {'$circle': {'$center': [42.03831, -88.290742], '$meters': 25000}}, 'filters': {'$and': [{'category_ids': {'$includes_any': [4]}}, {'chain_id': {'$blank': True}}]}, 'offset': 50}
PATH
t/places
RESPONSE
USER
{"status": "OK", "main": 2, "sub": [4], "user": "EASHERMA"}
<type 'dict'>
2016-06-30 13:45:25.302000
{'userParams': "{'status': 'OK', 'main': 2, 'sub': [], 'user': 'default'}", 'limit': 50, 'filters': {'$and': [{'category_ids': {'$includes_any': [4]}}, {'chain_id': {'$blank': True}}]}, 'offset': 50, 'date': '2016-06-30 13:45:25.306000', 'geo': {'$circle': {'$center': [42.03831, -88.290742], '$meters': 25000}}}
06-30-2016-13:45
@easherma
Copy link
Author

get default params, this is called from classes.py when the searchParams is built

@easherma
Copy link
Author

This is what the backend sees when you press the submit params button, it changes the params to match the form submission from the frontend. No API call is made

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment