Skip to content

Commit

Permalink
Merge pull request #255 from DenisCarriere/feature_mutiple_results
Browse files Browse the repository at this point in the history
Start refactoring to handle mutiple results
  • Loading branch information
ebreton committed Aug 2, 2017
2 parents a681e8a + c9a35fa commit b2e79ae
Show file tree
Hide file tree
Showing 11 changed files with 1,133 additions and 110 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ python:
- "3.3"
- "3.4"
- "3.5"
- "3.6"

before_install:
- pip install -r requirements-dev.txt
Expand Down
9 changes: 7 additions & 2 deletions geocoder/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
from geocoder.maxmind import Maxmind
from geocoder.location import Location
from geocoder.opencage import OpenCage
from geocoder.geonames import Geonames
from geocoder.geonames import GeonamesQuery
from geocoder.geonames_details import GeonamesDetails
from geocoder.geonames_children import GeonamesChildren
from geocoder.geonames_hierarchy import GeonamesHierarchy
from geocoder.mapquest import Mapquest
Expand Down Expand Up @@ -80,7 +81,9 @@
'maxmind': {'geocode': Maxmind},
'ipinfo': {'geocode': Ipinfo},
'geonames': {
'geocode': Geonames,
'geocode': GeonamesQuery,
'details': GeonamesDetails,
'timezone': GeonamesDetails,
'children': GeonamesChildren,
'hierarchy': GeonamesHierarchy
},
Expand Down Expand Up @@ -470,6 +473,8 @@ def geonames(location, **kwargs):
:param ``username``: (required) needs to be passed with each request.
:param method: (default=geocode) Use the following:
> geocode
> details (mainly for administrive data and timzone)
> timezone (alias for details)
> children
> hierarchy
"""
Expand Down

0 comments on commit b2e79ae

Please sign in to comment.