Skip to content

Commit

Permalink
docs: fix documentation and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Oct 28, 2024
1 parent 04a00a5 commit 1719ed4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,20 @@ except ApiException as e:
Update event for requestId:
```python
import fingerprint_pro_server_api_sdk
from fingerprint_pro_server_api_sdk import EventUpdateRequest
from fingerprint_pro_server_api_sdk import EventsUpdateRequest
from fingerprint_pro_server_api_sdk.rest import ApiException, KnownApiException

configuration = fingerprint_pro_server_api_sdk.Configuration(api_key="SECRET_API_KEY")
api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration)

request_id = 'request_id_example' # str | The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid).
body = EventUpdateRequest(linked_id='foo') # EventUpdateRequest |
# body = EventUpdateRequest(tag={'bar': 123})
# body = EventUpdateRequest(suspect=True)
# body = EventUpdateRequest(linked_id='foo', tag={'bar': 123}, suspect=False)
body = EventsUpdateRequest(linked_id='foo') # EventsUpdateRequest |
# body = EventsUpdateRequest(tag={'bar': 123})
# body = EventsUpdateRequest(suspect=True)
# body = EventsUpdateRequest(linked_id='foo', tag={'bar': 123}, suspect=False)

try:
api_instance.update_event(request_id, body)
api_instance.update_event(body, request_id)
except KnownApiException as e:
structured_error = e.structured_error
print("Error code: %s. Error message: %s\n" % (structured_error.error.code, structured_error.error.message))
Expand Down
4 changes: 0 additions & 4 deletions docs/FingerprintApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Request deleting all data associated with the specified visitor ID. This API is
### Example
```python
import fingerprint_pro_server_api_sdk
from fingerprint_pro_server_api_sdk import Response
from fingerprint_pro_server_api_sdk.rest import ApiException

# Configure API key authorization and region
Expand Down Expand Up @@ -69,7 +68,6 @@ Get a detailed analysis of an individual identification event, including Smart S
### Example
```python
import fingerprint_pro_server_api_sdk
from fingerprint_pro_server_api_sdk import Response
from fingerprint_pro_server_api_sdk.rest import ApiException

# Configure API key authorization and region
Expand Down Expand Up @@ -120,7 +118,6 @@ Get a history of visits (identification events) for a specific `visitorId`. Use
### Example
```python
import fingerprint_pro_server_api_sdk
from fingerprint_pro_server_api_sdk import Response
from fingerprint_pro_server_api_sdk.rest import ApiException

# Configure API key authorization and region
Expand Down Expand Up @@ -181,7 +178,6 @@ Change information in existing events specified by `requestId` or *flag suspicio
### Example
```python
import fingerprint_pro_server_api_sdk
from fingerprint_pro_server_api_sdk import Response
from fingerprint_pro_server_api_sdk.rest import ApiException

# Configure API key authorization and region
Expand Down
12 changes: 6 additions & 6 deletions template/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,20 @@ except ApiException as e:
Update event for requestId:
```python
import {{packageName}}
from {{packageName}} import EventUpdateRequest
from {{packageName}} import EventsUpdateRequest
from {{packageName}}.rest import ApiException, KnownApiException

configuration = {{packageName}}.Configuration(api_key="SECRET_API_KEY")
api_instance = {{packageName}}.FingerprintApi(configuration)

request_id = 'request_id_example' # str | The unique event [identifier](https://dev.fingerprint.com/docs/js-agent#requestid).
body = EventUpdateRequest(linked_id='foo') # EventUpdateRequest |
# body = EventUpdateRequest(tag={'bar': 123})
# body = EventUpdateRequest(suspect=True)
# body = EventUpdateRequest(linked_id='foo', tag={'bar': 123}, suspect=False)
body = EventsUpdateRequest(linked_id='foo') # EventsUpdateRequest |
# body = EventsUpdateRequest(tag={'bar': 123})
# body = EventsUpdateRequest(suspect=True)
# body = EventsUpdateRequest(linked_id='foo', tag={'bar': 123}, suspect=False)

try:
api_instance.update_event(request_id, body)
api_instance.update_event(body, request_id)
except KnownApiException as e:
structured_error = e.structured_error
print("Error code: %s. Error message: %s\n" % (structured_error.error.code, structured_error.error.message))
Expand Down
1 change: 0 additions & 1 deletion template/api_doc.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Method | HTTP request | Description
### Example
```python
import {{{packageName}}}
from {{{packageName}}} import Response
from {{{packageName}}}.rest import ApiException

# Configure API key authorization and region
Expand Down
4 changes: 2 additions & 2 deletions update_event_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import fingerprint_pro_server_api_sdk
from fingerprint_pro_server_api_sdk.rest import ApiException
from fingerprint_pro_server_api_sdk.models import EventUpdateRequest
from fingerprint_pro_server_api_sdk.models import EventsUpdateRequest

from dotenv import load_dotenv

Expand All @@ -25,7 +25,7 @@
request_id = os.environ["REQUEST_ID_TO_UPDATE"]

try:
updateBody = EventUpdateRequest(**vars(args))
updateBody = EventsUpdateRequest(**vars(args))
print(f'updateBody: {updateBody}')
api_instance.update_event(updateBody, request_id)
except ApiException as e:
Expand Down

0 comments on commit 1719ed4

Please sign in to comment.