@@ -4,21 +4,27 @@ class Geocode():
44 def __init__ (self , client ):
55 self .client = client
66
7- def address (self , location , longitude = None , latitude = None , osm_tag = None , limit = None ):
7+ def address (self , location , latitude = None , longitude = None , osm_tag = None ,
8+ format = None , limit = None ):
89 return self .client ._request ('GET' , '/geocode/address' , params = {
910 'location' : location ,
10- 'longitude' : longitude ,
1111 'latitude' : latitude ,
12+ 'longitude' : longitude ,
1213 'osm_tag' : osm_tag ,
14+ 'format' : format ,
1315 'limit' : limit
1416 })
1517
16- def ip (self , ip ):
17- return self .client ._request ('GET' , '/geocode/ip' , params = {'ip' : ip })
18+ def ip (self , ip , format = None ):
19+ return self .client ._request ('GET' , '/geocode/ip' , params = {
20+ 'ip' : ip ,
21+ 'format' : format
22+ })
1823
19- def reverse (self , longitude , latitude , limit = None ):
24+ def reverse (self , latitude , longitude , limit = None ):
2025 return self .client ._request ('GET' , '/geocode/reverse' , params = {
21- 'longitude' : longitude ,
2226 'latitude' : latitude ,
27+ 'longitude' : longitude ,
28+ 'format' : format ,
2329 'limit' : limit
2430 })
0 commit comments