Skip to content

Commit 0c21847

Browse files
committed
docs: simplify example as we have inline types
1 parent 1121a5c commit 0c21847

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration)
8989
Fetching visits using visitorId:
9090
```python
9191
import fingerprint_pro_server_api_sdk
92-
from fingerprint_pro_server_api_sdk import Response
9392
from fingerprint_pro_server_api_sdk.rest import ApiException, KnownApiException
9493

9594
configuration = fingerprint_pro_server_api_sdk.Configuration(api_key="SECRET_API_KEY")
@@ -102,7 +101,7 @@ limit = 10 # int | Limit scanned results. For performance reasons, the API fi
102101
#pagination_key = 'pagination_key_example' # str | Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional)
103102

104103
try:
105-
api_response: Response = api_instance.get_visits(visitor_id, limit=2)
104+
api_response = api_instance.get_visits(visitor_id, limit=2)
106105
print(api_response)
107106
except KnownApiException as e:
108107
structured_error = e.structured_error
@@ -133,7 +132,6 @@ except ApiException as e:
133132
Fetching events for requestId:
134133
```python
135134
import fingerprint_pro_server_api_sdk
136-
from fingerprint_pro_server_api_sdk import EventResponse
137135
from fingerprint_pro_server_api_sdk.rest import ApiException, KnownApiException
138136

139137
configuration = fingerprint_pro_server_api_sdk.Configuration(api_key="SECRET_API_KEY")
@@ -142,7 +140,7 @@ api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration)
142140
request_id = 'request_id_example' # str | The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid).
143141

144142
try:
145-
events_response: EventResponse = api_instance.get_event(request_id)
143+
events_response = api_instance.get_event(request_id)
146144

147145
except KnownApiException as e:
148146
structured_error = e.structured_error

template/README.mustache

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ api_instance = {{packageName}}.FingerprintApi(configuration)
9595
Fetching visits using visitorId:
9696
```python
9797
import {{packageName}}
98-
from {{packageName}} import Response
9998
from {{packageName}}.rest import ApiException, KnownApiException
10099

101100
configuration = {{packageName}}.Configuration(api_key="SECRET_API_KEY")
@@ -108,7 +107,7 @@ limit = 10 # int | Limit scanned results. For performance reasons, the API fi
108107
#pagination_key = 'pagination_key_example' # str | Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. (optional)
109108

110109
try:
111-
api_response: Response = api_instance.get_visits(visitor_id, limit=2)
110+
api_response = api_instance.get_visits(visitor_id, limit=2)
112111
print(api_response)
113112
except KnownApiException as e:
114113
structured_error = e.structured_error
@@ -139,7 +138,6 @@ except ApiException as e:
139138
Fetching events for requestId:
140139
```python
141140
import {{packageName}}
142-
from {{packageName}} import EventResponse
143141
from {{packageName}}.rest import ApiException, KnownApiException
144142

145143
configuration = {{packageName}}.Configuration(api_key="SECRET_API_KEY")
@@ -148,7 +146,7 @@ api_instance = {{packageName}}.FingerprintApi(configuration)
148146
request_id = 'request_id_example' # str | The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid).
149147

150148
try:
151-
events_response: EventResponse = api_instance.get_event(request_id)
149+
events_response = api_instance.get_event(request_id)
152150

153151
except KnownApiException as e:
154152
structured_error = e.structured_error

0 commit comments

Comments
 (0)