@@ -21,9 +21,8 @@ Instantiate and use the client with the following:
2121
2222``` python
2323from whoisfreaks import WhoisfreaksApi
24- from whoisfreaks.environment import WhoisfreaksApiEnvironment
25- client = WhoisfreaksApi(environment = WhoisfreaksApiEnvironment.PRODUCTION , )
26- client.dns.bulk_dns_lookup(api_key = ' YOUR_API_KEY' , type = ' all' , format = ' json' , domain_names = [' whoisfreaks.com' , ' jfreaks.com' ], ip_addresses = [' 1.1.1.1' , ' 8.8.8.8' ], )
24+ client = WhoisfreaksApi()
25+ client.bulk_domain_lookup(api_key = ' apiKey' , )
2726```
2827
2928## Async Client
@@ -32,11 +31,10 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
3231
3332``` python
3433from whoisfreaks import AsyncWhoisfreaksApi
35- from whoisfreaks.environment import WhoisfreaksApiEnvironment
3634import asyncio
37- client = AsyncWhoisfreaksApi(environment = WhoisfreaksApiEnvironment. PRODUCTION , )
35+ client = AsyncWhoisfreaksApi()
3836async def main () -> None :
39- await client.dns.bulk_dns_lookup (api_key = ' YOUR_API_KEY ' , type = ' all ' , format = ' json ' , domain_names = [ ' whoisfreaks.com ' , ' jfreaks.com ' ], ip_addresses = [ ' 1.1.1.1 ' , ' 8.8.8.8 ' ] , )
37+ await client.bulk_domain_lookup (api_key = ' apiKey ' , )
4038asyncio.run(main())```
4139
4240# # Exception Handling
@@ -47,7 +45,7 @@ will be thrown.
4745```python
4846from whoisfreaks.core.api_error import ApiError
4947try :
50- client.dns.bulk_dns_lookup (... )
48+ client.bulk_domain_lookup (... )
5149except ApiError as e:
5250 print (e.status_code)
5351 print (e.body)
@@ -63,7 +61,7 @@ The `.with_raw_response` property returns a "raw" client that can be used to acc
6361``` python
6462from whoisfreaks import WhoisfreaksApi
6563client = WhoisfreaksApi(... , )
66- response = client.dns. with_raw_response.bulk_dns_lookup (... )
64+ response = client.with_raw_response.bulk_domain_lookup (... )
6765print (response.headers) # access the response headers
6866print (response.data) # access the underlying object
6967```
@@ -83,7 +81,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
8381Use the ` max_retries ` request option to configure this behavior.
8482
8583``` python
86- client.dns.bulk_dns_lookup (... , request_options = {
84+ client.bulk_domain_lookup (... , request_options = {
8785 " max_retries" : 1
8886})
8987```
@@ -98,7 +96,7 @@ from whoisfreaks import WhoisfreaksApi
9896client = WhoisfreaksApi(... , timeout = 20.0 , )
9997
10098# Override timeout for a specific method
101- client.dns.bulk_dns_lookup (... , request_options = {
99+ client.bulk_domain_lookup (... , request_options = {
102100 " timeout_in_seconds" : 1
103101})
104102```
0 commit comments