Skip to content

Commit

Permalink
Add documentation about base data type access
Browse files Browse the repository at this point in the history
  • Loading branch information
bennylope committed Feb 23, 2017
1 parent 5bd11e6 commit 5b57266
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ requested or primary data elements, and to make accessing data simple.
By adding only a few methods and data lookup elements the source data is
largely left as-is for developers to use as they see fit.

For example, if the data for a geocoded address returned by Geocodio includes
`accuracy_type`, then you access that by referencing the key, `'accuracy_type'`.::

>>> geocoded_location = client.geocode("42370 Bob Hope Drive, Rancho Mirage CA")
>>> geocoded_location.accuracy
1
>>> geocoded_location.accuracy_type
Traceback (most recent call last)
File "<stdin>", line 1, in <module>
AttributeError: 'Location' object has no attribute 'accuracy_type'.
>>> geocoded_location['accuracy_type']
"rooftop"

.. currentmodule:: geocodio.data

Address
Expand Down

0 comments on commit 5b57266

Please sign in to comment.