mirror of https://github.com/sgoudham/Enso-Bot.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
819 B
Python
23 lines
819 B
Python
def City(response):
|
|
return {
|
|
'city': response.city.name,
|
|
'continent_code': response.continent.code,
|
|
'continent_name': response.continent.name,
|
|
'country_code': response.country.iso_code,
|
|
'country_name': response.country.name,
|
|
'dma_code': response.location.metro_code,
|
|
'is_in_european_union': response.country.is_in_european_union,
|
|
'latitude': response.location.latitude,
|
|
'longitude': response.location.longitude,
|
|
'postal_code': response.postal.code,
|
|
'region': response.subdivisions[0].iso_code if response.subdivisions else None,
|
|
'time_zone': response.location.time_zone,
|
|
}
|
|
|
|
|
|
def Country(response):
|
|
return {
|
|
'country_code': response.country.iso_code,
|
|
'country_name': response.country.name,
|
|
}
|