Skip to content

Commit

Permalink
Add .capital_latlng() method to get capital coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
David Breuer committed May 27, 2020
1 parent 5618070 commit 988002e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions countryinfo/countryinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@ def capital(self):

return _capital

def capital_latlng(self):
"""Returns capital city latitude and longitude for a specified country
:return: str
"""
if self.__country_name:
_capital_latlng = self.__countries[self.__country_name]['capital_latlng']
# pprint(_capital)

return _capital_latlng

def currencies(self):
"""Returns official currencies for a specified country
Expand Down

0 comments on commit 988002e

Please sign in to comment.