-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
94 lines (81 loc) · 2.93 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
def _make_call(action, args=[], debug=0):
'''
action: (string) API method we wish to call
args: (list of tuples) A list of key,value tuples
'''
def set_country(country_code):
'''
Choose the country we wish to use.
Available country codes can be returned by using get_supported_countries().
'''
def get_supported_countries():
'''
Return list of all supported countries
'''
def get_country():
'''
Return current country.
'''
def echo(**kwargs):
'''
Make an 'echo' request. Whatever named arguments are passed to this method
are used as parameters to the request.
'''
def keywords():
'''
Make a 'keywords' request. Returns all available keywords from the nestoria
API.
'''
def metadata_by_area(place_name):
'''
place_name: (string) anything you would type into the search
box on Nestoria: a place name, post code,
tube station, etc.
e.g. "Chelsea" or "SW14"
'''
def metadata_by_longlat(longlat):
'''
longlat: (two-tuple of strings) a bounding box in the format
sw_latitude, sw_longitude, ne_latitude2, ne_longitude2
e.g ('51.684183,-3.431481', '51.85415,-3.077859')
'''
def metadata_by_center(center, radius='2km'):
'''
center: (string) latitude and longitude. A default radius of 2km
will be used.
e.g. '51.684183,-3.431481'
radius: (string) radius from center in kilometers or miles
(km or mi needs to be set)
e.g 10km
'''
def search_by_area(place_name, sf, snp):
'''
place_name: (string) anything you would type into the search
box on Nestoria: a place name, post code,
tube station, etc.
e.g. "Chelsea" or "SW14"
filter: (dictionary) http://www.nestoria.co.uk/help/api-search-listings
'''
def search_by_longlat(longlat, sf, snp):
'''
longlat: (two-tuple of strings) a bounding box in the format
sw_latitude, sw_longitude, ne_latitude2, ne_longitude2
e.g ('51.684183,-3.431481', '51.85415,-3.077859')
sf: (dictionary) search filter as defined in
http://www.nestoria.co.uk/help/api-search-listings
snp: (dictionary) Sort and pagination parameters as defined in
http://www.nestoria.co.uk/help/api-search-listings
'''
def search_by_center(center, sf, snp, radius='2km'):
'''
center: (string) latitude and longitude. A default radius of 2km
will be used.
e.g. '51.684183,-3.431481'
radius: (string) radius from center in kilometers or miles
(km or mi needs to be set)
e.g 10km
sf: (dictionary) search filter as defined in
http://www.nestoria.co.uk/help/api-search-listings
snp: (dictionary) Sort and pagination parameters as defined in
http://www.nestoria.co.uk/help/api-search-listings
'''