Skip to content

Commit 3bbb0ca

Browse files
Update examples in README
1 parent 586694d commit 3bbb0ca

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ pip install ipregistry
2929
from ipregistry import IpregistryClient
3030

3131
client = IpregistryClient("YOUR_API_KEY")
32-
ip_info = client.lookup_ip("54.85.132.205")
33-
print(ip_info)
32+
response = client.lookup_ip("54.85.132.205")
33+
print(response.data)
3434
```
3535

3636
#### Batch IP Lookup
@@ -39,8 +39,8 @@ print(ip_info)
3939
from ipregistry import IpregistryClient
4040

4141
client = IpregistryClient("YOUR_API_KEY")
42-
results = client.batch_lookup_ips(["54.85.132.205", "8.8.8.8", "2001:67c:2e8:22::c100:68b"])
43-
for ip_info in results:
42+
response = client.batch_lookup_ips(["54.85.132.205", "8.8.8.8", "2001:67c:2e8:22::c100:68b"])
43+
for ip_info in response.data:
4444
print(ip_info)
4545
```
4646

@@ -50,8 +50,8 @@ for ip_info in results:
5050
from ipregistry import IpregistryClient
5151

5252
client = IpregistryClient("YOUR_API_KEY")
53-
ip_info = client.origin_lookup_ip()
54-
print(ip_info)
53+
response = client.origin_lookup_ip()
54+
print(response.data)
5555
```
5656

5757
More advanced examples are available in the [samples](https://github.com/ipregistry/ipregistry-python/tree/master/samples)

0 commit comments

Comments
 (0)