@@ -159,7 +159,7 @@ def city(self, ip_address='me'):
159159 :returns: :py:class:`geoip2.models.City` object
160160
161161 """
162- return self ._response_for ('city' , geoip2 .models .City , ip )
162+ return self ._response_for ('city' , geoip2 .models .City , ip_address )
163163
164164 def city_isp_org (self , ip_address = 'me' ):
165165 """This method calls the GeoIP2 Precision City/ISP/Org endpoint.
@@ -171,7 +171,8 @@ def city_isp_org(self, ip_address='me'):
171171 :returns: :py:class:`geoip2.models.CityISPOrg` object
172172
173173 """
174- return self ._response_for ('city_isp_org' , geoip2 .models .CityISPOrg , ip )
174+ return self ._response_for ('city_isp_org' , geoip2 .models .CityISPOrg ,
175+ ip_address )
175176
176177 def country (self , ip_address = 'me' ):
177178 """This method calls the GeoIP2 Country endpoint.
@@ -196,10 +197,10 @@ def omni(self, ip_address='me'):
196197 :returns: :py:class:`geoip2.models.Omni` object
197198
198199 """
199- return self ._response_for ('omni' , geoip2 .models .Omni , ip )
200+ return self ._response_for ('omni' , geoip2 .models .Omni , ip_address )
200201
201- def _response_for (self , path , model_class , ip ):
202- uri = '/' .join ([self ._base_uri , path , ip ])
202+ def _response_for (self , path , model_class , ip_address ):
203+ uri = '/' .join ([self ._base_uri , path , ip_address ])
203204 response = requests .get (uri , auth = (self .user_id , self .license_key ),
204205 headers = {'Accept' : 'application/json' })
205206 if (response .status_code == 200 ):
0 commit comments