Skip to content

Commit 4ca2d4b

Browse files
docs: update README examples to use Geocodio class name
Update all code examples and documentation in README to reflect the renamed class.
1 parent 0835d0b commit 4ca2d4b

File tree

2 files changed

+178
-178
lines changed

2 files changed

+178
-178
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Usage
2424
### Geocoding
2525

2626
```python
27-
from geocodio import GeocodioClient
27+
from geocodio import Geocodio
2828

2929
# Initialize the client with your API key
30-
client = GeocodioClient("YOUR_API_KEY")
30+
client = Geocodio("YOUR_API_KEY")
3131

3232
# Single forward geocode
3333
response = client.geocode("1600 Pennsylvania Ave, Washington, DC")
@@ -59,10 +59,10 @@ print(data.results[0].fields.timezone.name if data.results[0].fields.timezone el
5959
The List API allows you to manage lists of addresses or coordinates for batch processing.
6060

6161
```python
62-
from geocodio import GeocodioClient
62+
from geocodio import Geocodio
6363

6464
# Initialize the client with your API key
65-
client = GeocodioClient("YOUR_API_KEY")
65+
client = Geocodio("YOUR_API_KEY")
6666

6767
# Get all lists
6868
lists = client.get_lists()
@@ -94,17 +94,17 @@ Error Handling
9494
--------------
9595

9696
```python
97-
from geocodio import GeocodioClient
97+
from geocodio import Geocodio
9898
from geocodio.exceptions import AuthenticationError, InvalidRequestError
9999

100100
try:
101-
client = GeocodioClient("INVALID_API_KEY")
101+
client = Geocodio("INVALID_API_KEY")
102102
response = client.geocode("1600 Pennsylvania Ave, Washington, DC")
103103
except AuthenticationError as e:
104104
print(f"Authentication failed: {e}")
105105

106106
try:
107-
client = GeocodioClient("YOUR_API_KEY")
107+
client = Geocodio("YOUR_API_KEY")
108108
response = client.geocode("") # Empty address
109109
except InvalidRequestError as e:
110110
print(f"Invalid request: {e}")
@@ -116,10 +116,10 @@ Geocodio Enterprise
116116
To use this library with Geocodio Enterprise, pass `api.enterprise.geocod.io` as the `hostname` parameter when initializing the client:
117117

118118
```python
119-
from geocodio import GeocodioClient
119+
from geocodio import Geocodio
120120

121121
# Initialize client for Geocodio Enterprise
122-
client = GeocodioClient(
122+
client = Geocodio(
123123
"YOUR_API_KEY",
124124
hostname="api.enterprise.geocod.io"
125125
)

0 commit comments

Comments
 (0)