diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05e9cb76..a2398869 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ on: jobs: tests: name: "Python ${{ matrix.python-version }}" - runs-on: "ubuntu-latest" + runs-on: "ubuntu-20.04" strategy: matrix: diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore index 24dc1934..306f8c7b 100644 --- a/.swagger-codegen-ignore +++ b/.swagger-codegen-ignore @@ -26,3 +26,4 @@ .travis.yml git_push.sh tox.ini +test/*.py diff --git a/README.md b/README.md index 927f98cc..58e0a2fe 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@
# Fingerprint Pro Server Python SDK -Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. +Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: @@ -143,17 +143,20 @@ All URIs are relative to *https://api.fpjs.io* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*FingerprintApi* | [**get_event**](docs/FingerprintApi.md#get_event) | **GET** /events/{request_id} | Get event by request ID -*FingerprintApi* | [**get_visits**](docs/FingerprintApi.md#get_visits) | **GET** /visitors/{visitor_id} | +*FingerprintApi* | [**get_event**](docs/FingerprintApi.md#get_event) | **GET** /events/{request_id} | Get event by requestId +*FingerprintApi* | [**get_visits**](docs/FingerprintApi.md#get_visits) | **GET** /visitors/{visitor_id} | Get visits by visitorId ## Documentation For Models - [BotdDetectionResult](docs/BotdDetectionResult.md) + - [BotdError](docs/BotdError.md) - [BotdResult](docs/BotdResult.md) - [BrowserDetails](docs/BrowserDetails.md) - [Confidence](docs/Confidence.md) - - [ErrorResponse](docs/ErrorResponse.md) - - [ErrorResponseError](docs/ErrorResponseError.md) + - [ErrorEvent403Response](docs/ErrorEvent403Response.md) + - [ErrorEvent403ResponseError](docs/ErrorEvent403ResponseError.md) + - [ErrorEvent404Response](docs/ErrorEvent404Response.md) + - [ErrorEvent404ResponseError](docs/ErrorEvent404ResponseError.md) - [EventResponse](docs/EventResponse.md) - [IPLocation](docs/IPLocation.md) - [IPLocationCity](docs/IPLocationCity.md) @@ -165,7 +168,7 @@ Class | Method | HTTP request | Description - [ProductsResponseIdentificationData](docs/ProductsResponseIdentificationData.md) - [Response](docs/Response.md) - [ResponseVisits](docs/ResponseVisits.md) - - [StSeenAt](docs/StSeenAt.md) + - [SeenAt](docs/SeenAt.md) - [Subdivision](docs/Subdivision.md) - [Visit](docs/Visit.md) - [WebhookVisit](docs/WebhookVisit.md) diff --git a/docs/BotdError.md b/docs/BotdError.md new file mode 100644 index 00000000..84ae9ee3 --- /dev/null +++ b/docs/BotdError.md @@ -0,0 +1,10 @@ +# BotdError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | Error code: * `TooManyRequests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error | +**message** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ErrorResponse.md b/docs/ErrorEvent403Response.md similarity index 70% rename from docs/ErrorResponse.md rename to docs/ErrorEvent403Response.md index ed1ab0d2..b8a3b792 100644 --- a/docs/ErrorResponse.md +++ b/docs/ErrorEvent403Response.md @@ -1,9 +1,9 @@ -# ErrorResponse +# ErrorEvent403Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | [**ErrorResponseError**](ErrorResponseError.md) | | [optional] +**error** | [**ErrorEvent403ResponseError**](ErrorEvent403ResponseError.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ErrorEvent403ResponseError.md b/docs/ErrorEvent403ResponseError.md new file mode 100644 index 00000000..a25d3a97 --- /dev/null +++ b/docs/ErrorEvent403ResponseError.md @@ -0,0 +1,10 @@ +# ErrorEvent403ResponseError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - subscription not found for specified secret key * `SubscriptionNotActive` - subscription is not active * `WrongRegion` - server and subscription region differ | +**message** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ErrorResponseError.md b/docs/ErrorEvent404Response.md similarity index 70% rename from docs/ErrorResponseError.md rename to docs/ErrorEvent404Response.md index 7a1eee28..eb9d306a 100644 --- a/docs/ErrorResponseError.md +++ b/docs/ErrorEvent404Response.md @@ -1,10 +1,9 @@ -# ErrorResponseError +# ErrorEvent404Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**code** | **str** | | [optional] -**message** | **str** | | [optional] +**error** | [**ErrorEvent404ResponseError**](ErrorEvent404ResponseError.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ErrorEvent404ResponseError.md b/docs/ErrorEvent404ResponseError.md new file mode 100644 index 00000000..5471a793 --- /dev/null +++ b/docs/ErrorEvent404ResponseError.md @@ -0,0 +1,10 @@ +# ErrorEvent404ResponseError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | Error code: * `RequestNotFound` - request not found for specified id | +**message** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index 2a5a04d6..764aad75 100644 --- a/docs/FingerprintApi.md +++ b/docs/FingerprintApi.md @@ -4,15 +4,15 @@ All URIs are relative to *https://api.fpjs.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_event**](FingerprintApi.md#get_event) | **GET** /events/{request_id} | Get event by request ID -[**get_visits**](FingerprintApi.md#get_visits) | **GET** /visitors/{visitor_id} | +[**get_event**](FingerprintApi.md#get_event) | **GET** /events/{request_id} | Get event by requestId +[**get_visits**](FingerprintApi.md#get_visits) | **GET** /visitors/{visitor_id} | Get visits by visitorId # **get_event** > EventResponse get_event(request_id) -Get event by request ID +Get event by requestId -This endpoint allows you to get events with all the information from each activated product - BOTD and Fingerprinting. Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId. +This endpoint allows you to get events with all the information from each activated product (Fingerprint Pro or Bot Detection). Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId. ### Example ```python @@ -43,7 +43,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **request_id** | **str**| Request ID | + **request_id** | **str**| requestId is the unique identifier of each request | ### Return type @@ -63,7 +63,7 @@ Name | Type | Description | Notes # **get_visits** > Response get_visits(visitor_id, request_id=request_id, linked_id=linked_id, limit=limit, before=before) - +Get visits by visitorId This endpoint allows you to get a history of visits with all available information. Use the visitorId as a URL path parameter. This API method is scoped to a visitor, i.e. all returned information is by visitorId. @@ -97,8 +97,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **visitor_id** | **str**| | - **request_id** | **str**| Filter events by requestId | [optional] - **linked_id** | **str**| Filter events by custom identifier | [optional] + **request_id** | **str**| Filter visits by requestId | [optional] + **linked_id** | **str**| Filter visits by custom identifier | [optional] **limit** | **int**| Limit scanned results | [optional] **before** | **int**| Used to paginate results | [optional] @@ -113,7 +113,7 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json + - **Accept**: application/json, text/html [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/ProductsResponseBotd.md b/docs/ProductsResponseBotd.md index 020dd41e..bb18a440 100644 --- a/docs/ProductsResponseBotd.md +++ b/docs/ProductsResponseBotd.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**BotdResult**](BotdResult.md) | | [optional] +**error** | [**BotdError**](BotdError.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProductsResponseIdentificationData.md b/docs/ProductsResponseIdentificationData.md index 7e4a91f4..4797099c 100644 --- a/docs/ProductsResponseIdentificationData.md +++ b/docs/ProductsResponseIdentificationData.md @@ -15,8 +15,8 @@ Name | Type | Description | Notes **linked_id** | **str** | A customer-provided id that was sent with identification request. | [optional] **confidence** | [**Confidence**](Confidence.md) | | **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | -**first_seen_at** | [**StSeenAt**](StSeenAt.md) | | -**last_seen_at** | [**StSeenAt**](StSeenAt.md) | | +**first_seen_at** | [**SeenAt**](SeenAt.md) | | +**last_seen_at** | [**SeenAt**](SeenAt.md) | | **visitor_id** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResponseVisits.md b/docs/ResponseVisits.md index c46907a6..9af87c83 100644 --- a/docs/ResponseVisits.md +++ b/docs/ResponseVisits.md @@ -15,8 +15,8 @@ Name | Type | Description | Notes **linked_id** | **str** | A customer-provided id that was sent with identification request. | [optional] **confidence** | [**Confidence**](Confidence.md) | | **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | -**first_seen_at** | [**StSeenAt**](StSeenAt.md) | | -**last_seen_at** | [**StSeenAt**](StSeenAt.md) | | +**first_seen_at** | [**SeenAt**](SeenAt.md) | | +**last_seen_at** | [**SeenAt**](SeenAt.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StSeenAt.md b/docs/SeenAt.md similarity index 96% rename from docs/StSeenAt.md rename to docs/SeenAt.md index de60c7ca..b87b1bc4 100644 --- a/docs/StSeenAt.md +++ b/docs/SeenAt.md @@ -1,4 +1,4 @@ -# StSeenAt +# SeenAt ## Properties Name | Type | Description | Notes diff --git a/docs/Visit.md b/docs/Visit.md index 2b8c6b6f..94489f62 100644 --- a/docs/Visit.md +++ b/docs/Visit.md @@ -15,8 +15,8 @@ Name | Type | Description | Notes **linked_id** | **str** | A customer-provided id that was sent with identification request. | [optional] **confidence** | [**Confidence**](Confidence.md) | | **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | -**first_seen_at** | [**StSeenAt**](StSeenAt.md) | | -**last_seen_at** | [**StSeenAt**](StSeenAt.md) | | +**first_seen_at** | [**SeenAt**](SeenAt.md) | | +**last_seen_at** | [**SeenAt**](SeenAt.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookVisit.md b/docs/WebhookVisit.md index e12857c3..fe4657bd 100644 --- a/docs/WebhookVisit.md +++ b/docs/WebhookVisit.md @@ -17,8 +17,8 @@ Name | Type | Description | Notes **linked_id** | **str** | A customer-provided id that was sent with identification request. | [optional] **confidence** | [**Confidence**](Confidence.md) | | **visitor_found** | **bool** | Attribute represents if a visitor had been identified before. | -**first_seen_at** | [**StSeenAt**](StSeenAt.md) | | -**last_seen_at** | [**StSeenAt**](StSeenAt.md) | | +**first_seen_at** | [**SeenAt**](SeenAt.md) | | +**last_seen_at** | [**SeenAt**](SeenAt.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/fingerprint_pro_server_api_sdk/__init__.py b/fingerprint_pro_server_api_sdk/__init__.py index 6279b6f6..5c5b941e 100644 --- a/fingerprint_pro_server_api_sdk/__init__.py +++ b/fingerprint_pro_server_api_sdk/__init__.py @@ -5,7 +5,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -21,11 +21,14 @@ from fingerprint_pro_server_api_sdk.configuration import Configuration # import models into sdk package from fingerprint_pro_server_api_sdk.models.botd_detection_result import BotdDetectionResult +from fingerprint_pro_server_api_sdk.models.botd_error import BotdError from fingerprint_pro_server_api_sdk.models.botd_result import BotdResult from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails from fingerprint_pro_server_api_sdk.models.confidence import Confidence -from fingerprint_pro_server_api_sdk.models.error_response import ErrorResponse -from fingerprint_pro_server_api_sdk.models.error_response_error import ErrorResponseError +from fingerprint_pro_server_api_sdk.models.error_event403_response import ErrorEvent403Response +from fingerprint_pro_server_api_sdk.models.error_event403_response_error import ErrorEvent403ResponseError +from fingerprint_pro_server_api_sdk.models.error_event404_response import ErrorEvent404Response +from fingerprint_pro_server_api_sdk.models.error_event404_response_error import ErrorEvent404ResponseError from fingerprint_pro_server_api_sdk.models.event_response import EventResponse from fingerprint_pro_server_api_sdk.models.ip_location import IPLocation from fingerprint_pro_server_api_sdk.models.ip_location_city import IPLocationCity @@ -37,7 +40,7 @@ from fingerprint_pro_server_api_sdk.models.products_response_identification_data import ProductsResponseIdentificationData from fingerprint_pro_server_api_sdk.models.response import Response from fingerprint_pro_server_api_sdk.models.response_visits import ResponseVisits -from fingerprint_pro_server_api_sdk.models.st_seen_at import StSeenAt +from fingerprint_pro_server_api_sdk.models.seen_at import SeenAt from fingerprint_pro_server_api_sdk.models.subdivision import Subdivision from fingerprint_pro_server_api_sdk.models.visit import Visit from fingerprint_pro_server_api_sdk.models.webhook_visit import WebhookVisit diff --git a/fingerprint_pro_server_api_sdk/api/fingerprint_api.py b/fingerprint_pro_server_api_sdk/api/fingerprint_api.py index a9debb11..d8a39255 100644 --- a/fingerprint_pro_server_api_sdk/api/fingerprint_api.py +++ b/fingerprint_pro_server_api_sdk/api/fingerprint_api.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -33,16 +33,16 @@ def __init__(self, configuration=None): self.api_client = ApiClient(configuration) def get_event(self, request_id, **kwargs): # noqa: E501 - """Get event by request ID # noqa: E501 + """Get event by requestId # noqa: E501 - This endpoint allows you to get events with all the information from each activated product - BOTD and Fingerprinting. Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId. # noqa: E501 + This endpoint allows you to get events with all the information from each activated product (Fingerprint Pro or Bot Detection). Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_event(request_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str request_id: Request ID (required) + :param str request_id: requestId is the unique identifier of each request (required) :return: EventResponse If the method is called asynchronously, returns the request thread. @@ -55,16 +55,16 @@ def get_event(self, request_id, **kwargs): # noqa: E501 return data def get_event_with_http_info(self, request_id, **kwargs): # noqa: E501 - """Get event by request ID # noqa: E501 + """Get event by requestId # noqa: E501 - This endpoint allows you to get events with all the information from each activated product - BOTD and Fingerprinting. Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId. # noqa: E501 + This endpoint allows you to get events with all the information from each activated product (Fingerprint Pro or Bot Detection). Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_event_with_http_info(request_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str request_id: Request ID (required) + :param str request_id: requestId is the unique identifier of each request (required) :return: EventResponse If the method is called asynchronously, returns the request thread. @@ -129,7 +129,7 @@ def get_event_with_http_info(self, request_id, **kwargs): # noqa: E501 collection_formats=collection_formats) def get_visits(self, visitor_id, **kwargs): # noqa: E501 - """get_visits # noqa: E501 + """Get visits by visitorId # noqa: E501 This endpoint allows you to get a history of visits with all available information. Use the visitorId as a URL path parameter. This API method is scoped to a visitor, i.e. all returned information is by visitorId. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -139,8 +139,8 @@ def get_visits(self, visitor_id, **kwargs): # noqa: E501 :param async_req bool :param str visitor_id: (required) - :param str request_id: Filter events by requestId - :param str linked_id: Filter events by custom identifier + :param str request_id: Filter visits by requestId + :param str linked_id: Filter visits by custom identifier :param int limit: Limit scanned results :param int before: Used to paginate results :return: Response @@ -155,7 +155,7 @@ def get_visits(self, visitor_id, **kwargs): # noqa: E501 return data def get_visits_with_http_info(self, visitor_id, **kwargs): # noqa: E501 - """get_visits # noqa: E501 + """Get visits by visitorId # noqa: E501 This endpoint allows you to get a history of visits with all available information. Use the visitorId as a URL path parameter. This API method is scoped to a visitor, i.e. all returned information is by visitorId. # noqa: E501 This method makes a synchronous HTTP request by default. To make an @@ -165,8 +165,8 @@ def get_visits_with_http_info(self, visitor_id, **kwargs): # noqa: E501 :param async_req bool :param str visitor_id: (required) - :param str request_id: Filter events by requestId - :param str linked_id: Filter events by custom identifier + :param str request_id: Filter visits by requestId + :param str linked_id: Filter visits by custom identifier :param int limit: Limit scanned results :param int before: Used to paginate results :return: Response @@ -219,7 +219,7 @@ def get_visits_with_http_info(self, visitor_id, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['application/json', 'text/html']) # noqa: E501 # Authentication setting auth_settings = ['ApiKeyHeader', 'ApiKeyQuery'] # noqa: E501 diff --git a/fingerprint_pro_server_api_sdk/api_client.py b/fingerprint_pro_server_api_sdk/api_client.py index 738654fd..c4507de7 100644 --- a/fingerprint_pro_server_api_sdk/api_client.py +++ b/fingerprint_pro_server_api_sdk/api_client.py @@ -2,7 +2,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/configuration.py b/fingerprint_pro_server_api_sdk/configuration.py index 38a5de42..be7ac755 100644 --- a/fingerprint_pro_server_api_sdk/configuration.py +++ b/fingerprint_pro_server_api_sdk/configuration.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/__init__.py b/fingerprint_pro_server_api_sdk/models/__init__.py index 3bb3871c..7134495d 100644 --- a/fingerprint_pro_server_api_sdk/models/__init__.py +++ b/fingerprint_pro_server_api_sdk/models/__init__.py @@ -4,7 +4,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -15,11 +15,14 @@ # import models into model package from fingerprint_pro_server_api_sdk.models.botd_detection_result import BotdDetectionResult +from fingerprint_pro_server_api_sdk.models.botd_error import BotdError from fingerprint_pro_server_api_sdk.models.botd_result import BotdResult from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails from fingerprint_pro_server_api_sdk.models.confidence import Confidence -from fingerprint_pro_server_api_sdk.models.error_response import ErrorResponse -from fingerprint_pro_server_api_sdk.models.error_response_error import ErrorResponseError +from fingerprint_pro_server_api_sdk.models.error_event403_response import ErrorEvent403Response +from fingerprint_pro_server_api_sdk.models.error_event403_response_error import ErrorEvent403ResponseError +from fingerprint_pro_server_api_sdk.models.error_event404_response import ErrorEvent404Response +from fingerprint_pro_server_api_sdk.models.error_event404_response_error import ErrorEvent404ResponseError from fingerprint_pro_server_api_sdk.models.event_response import EventResponse from fingerprint_pro_server_api_sdk.models.ip_location import IPLocation from fingerprint_pro_server_api_sdk.models.ip_location_city import IPLocationCity @@ -31,7 +34,7 @@ from fingerprint_pro_server_api_sdk.models.products_response_identification_data import ProductsResponseIdentificationData from fingerprint_pro_server_api_sdk.models.response import Response from fingerprint_pro_server_api_sdk.models.response_visits import ResponseVisits -from fingerprint_pro_server_api_sdk.models.st_seen_at import StSeenAt +from fingerprint_pro_server_api_sdk.models.seen_at import SeenAt from fingerprint_pro_server_api_sdk.models.subdivision import Subdivision from fingerprint_pro_server_api_sdk.models.visit import Visit from fingerprint_pro_server_api_sdk.models.webhook_visit import WebhookVisit diff --git a/fingerprint_pro_server_api_sdk/models/botd_detection_result.py b/fingerprint_pro_server_api_sdk/models/botd_detection_result.py index b71f3508..f6fc5442 100644 --- a/fingerprint_pro_server_api_sdk/models/botd_detection_result.py +++ b/fingerprint_pro_server_api_sdk/models/botd_detection_result.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/error_response_error.py b/fingerprint_pro_server_api_sdk/models/botd_error.py similarity index 60% rename from fingerprint_pro_server_api_sdk/models/error_response_error.py rename to fingerprint_pro_server_api_sdk/models/botd_error.py index f5dda9a5..3ee5ea17 100644 --- a/fingerprint_pro_server_api_sdk/models/error_response_error.py +++ b/fingerprint_pro_server_api_sdk/models/botd_error.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -15,7 +15,7 @@ import six -class ErrorResponseError(object): +class BotdError(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -38,54 +38,64 @@ class ErrorResponseError(object): } def __init__(self, code=None, message=None): # noqa: E501 - """ErrorResponseError - a model defined in Swagger""" # noqa: E501 + """BotdError - a model defined in Swagger""" # noqa: E501 self._code = None self._message = None self.discriminator = None - if code is not None: - self.code = code - if message is not None: - self.message = message + self.code = code + self.message = message @property def code(self): - """Gets the code of this ErrorResponseError. # noqa: E501 + """Gets the code of this BotdError. # noqa: E501 + Error code: * `TooManyRequests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error # noqa: E501 - :return: The code of this ErrorResponseError. # noqa: E501 + :return: The code of this BotdError. # noqa: E501 :rtype: str """ return self._code @code.setter def code(self, code): - """Sets the code of this ErrorResponseError. + """Sets the code of this BotdError. + Error code: * `TooManyRequests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error # noqa: E501 - :param code: The code of this ErrorResponseError. # noqa: E501 + :param code: The code of this BotdError. # noqa: E501 :type: str """ + if code is None: + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + allowed_values = ["TooManyRequests", "Failed"] # noqa: E501 + if (code not in allowed_values): + raise ValueError( + "Invalid value for `code` ({0}), must be one of {1}" # noqa: E501 + .format(code, allowed_values) + ) self._code = code @property def message(self): - """Gets the message of this ErrorResponseError. # noqa: E501 + """Gets the message of this BotdError. # noqa: E501 - :return: The message of this ErrorResponseError. # noqa: E501 + :return: The message of this BotdError. # noqa: E501 :rtype: str """ return self._message @message.setter def message(self, message): - """Sets the message of this ErrorResponseError. + """Sets the message of this BotdError. - :param message: The message of this ErrorResponseError. # noqa: E501 + :param message: The message of this BotdError. # noqa: E501 :type: str """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 self._message = message @@ -110,7 +120,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(ErrorResponseError, dict): + if issubclass(BotdError, dict): for key, value in self.items(): result[key] = value @@ -126,14 +136,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, ErrorResponseError): + if not isinstance(other, BotdError): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, ErrorResponseError): + if not isinstance(other, BotdError): return True return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/botd_result.py b/fingerprint_pro_server_api_sdk/models/botd_result.py index 38ba0bc9..5e4e7452 100644 --- a/fingerprint_pro_server_api_sdk/models/botd_result.py +++ b/fingerprint_pro_server_api_sdk/models/botd_result.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/browser_details.py b/fingerprint_pro_server_api_sdk/models/browser_details.py index acf6ff13..4f0e5be4 100644 --- a/fingerprint_pro_server_api_sdk/models/browser_details.py +++ b/fingerprint_pro_server_api_sdk/models/browser_details.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/confidence.py b/fingerprint_pro_server_api_sdk/models/confidence.py index d525f0b5..59d58170 100644 --- a/fingerprint_pro_server_api_sdk/models/confidence.py +++ b/fingerprint_pro_server_api_sdk/models/confidence.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/error_response.py b/fingerprint_pro_server_api_sdk/models/error_event403_response.py similarity index 73% rename from fingerprint_pro_server_api_sdk/models/error_response.py rename to fingerprint_pro_server_api_sdk/models/error_event403_response.py index 57745827..d3b77254 100644 --- a/fingerprint_pro_server_api_sdk/models/error_response.py +++ b/fingerprint_pro_server_api_sdk/models/error_event403_response.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -15,7 +15,7 @@ import six -class ErrorResponse(object): +class ErrorEvent403Response(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -28,7 +28,7 @@ class ErrorResponse(object): and the value is json key in definition. """ swagger_types = { - 'error': 'ErrorResponseError' + 'error': 'ErrorEvent403ResponseError' } attribute_map = { @@ -36,7 +36,7 @@ class ErrorResponse(object): } def __init__(self, error=None): # noqa: E501 - """ErrorResponse - a model defined in Swagger""" # noqa: E501 + """ErrorEvent403Response - a model defined in Swagger""" # noqa: E501 self._error = None self.discriminator = None if error is not None: @@ -44,21 +44,21 @@ def __init__(self, error=None): # noqa: E501 @property def error(self): - """Gets the error of this ErrorResponse. # noqa: E501 + """Gets the error of this ErrorEvent403Response. # noqa: E501 - :return: The error of this ErrorResponse. # noqa: E501 - :rtype: ErrorResponseError + :return: The error of this ErrorEvent403Response. # noqa: E501 + :rtype: ErrorEvent403ResponseError """ return self._error @error.setter def error(self, error): - """Sets the error of this ErrorResponse. + """Sets the error of this ErrorEvent403Response. - :param error: The error of this ErrorResponse. # noqa: E501 - :type: ErrorResponseError + :param error: The error of this ErrorEvent403Response. # noqa: E501 + :type: ErrorEvent403ResponseError """ self._error = error @@ -84,7 +84,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(ErrorResponse, dict): + if issubclass(ErrorEvent403Response, dict): for key, value in self.items(): result[key] = value @@ -100,14 +100,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, ErrorResponse): + if not isinstance(other, ErrorEvent403Response): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, ErrorResponse): + if not isinstance(other, ErrorEvent403Response): return True return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/error_event403_response_error.py b/fingerprint_pro_server_api_sdk/models/error_event403_response_error.py new file mode 100644 index 00000000..070f9675 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/error_event403_response_error.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Fingerprint Pro Server API + + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 + + OpenAPI spec version: 3 + Contact: support@fingerprint.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ErrorEvent403ResponseError(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'code': 'str', + 'message': 'str' + } + + attribute_map = { + 'code': 'code', + 'message': 'message' + } + + def __init__(self, code=None, message=None): # noqa: E501 + """ErrorEvent403ResponseError - a model defined in Swagger""" # noqa: E501 + self._code = None + self._message = None + self.discriminator = None + self.code = code + self.message = message + + @property + def code(self): + """Gets the code of this ErrorEvent403ResponseError. # noqa: E501 + + Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - subscription not found for specified secret key * `SubscriptionNotActive` - subscription is not active * `WrongRegion` - server and subscription region differ # noqa: E501 + + :return: The code of this ErrorEvent403ResponseError. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ErrorEvent403ResponseError. + + Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - subscription not found for specified secret key * `SubscriptionNotActive` - subscription is not active * `WrongRegion` - server and subscription region differ # noqa: E501 + + :param code: The code of this ErrorEvent403ResponseError. # noqa: E501 + :type: str + """ + if code is None: + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + allowed_values = ["TokenRequired", "TokenNotFound", "SubscriptionNotActive", "WrongRegion"] # noqa: E501 + if (code not in allowed_values): + raise ValueError( + "Invalid value for `code` ({0}), must be one of {1}" # noqa: E501 + .format(code, allowed_values) + ) + + self._code = code + + @property + def message(self): + """Gets the message of this ErrorEvent403ResponseError. # noqa: E501 + + + :return: The message of this ErrorEvent403ResponseError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ErrorEvent403ResponseError. + + + :param message: The message of this ErrorEvent403ResponseError. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ErrorEvent403ResponseError, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ErrorEvent403ResponseError): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ErrorEvent403ResponseError): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/error_event404_response.py b/fingerprint_pro_server_api_sdk/models/error_event404_response.py new file mode 100644 index 00000000..269e2938 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/error_event404_response.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Fingerprint Pro Server API + + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 + + OpenAPI spec version: 3 + Contact: support@fingerprint.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ErrorEvent404Response(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'error': 'ErrorEvent404ResponseError' + } + + attribute_map = { + 'error': 'error' + } + + def __init__(self, error=None): # noqa: E501 + """ErrorEvent404Response - a model defined in Swagger""" # noqa: E501 + self._error = None + self.discriminator = None + if error is not None: + self.error = error + + @property + def error(self): + """Gets the error of this ErrorEvent404Response. # noqa: E501 + + + :return: The error of this ErrorEvent404Response. # noqa: E501 + :rtype: ErrorEvent404ResponseError + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this ErrorEvent404Response. + + + :param error: The error of this ErrorEvent404Response. # noqa: E501 + :type: ErrorEvent404ResponseError + """ + + self._error = error + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ErrorEvent404Response, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ErrorEvent404Response): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ErrorEvent404Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/error_event404_response_error.py b/fingerprint_pro_server_api_sdk/models/error_event404_response_error.py new file mode 100644 index 00000000..1d616a34 --- /dev/null +++ b/fingerprint_pro_server_api_sdk/models/error_event404_response_error.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Fingerprint Pro Server API + + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 + + OpenAPI spec version: 3 + Contact: support@fingerprint.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class ErrorEvent404ResponseError(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'code': 'str', + 'message': 'str' + } + + attribute_map = { + 'code': 'code', + 'message': 'message' + } + + def __init__(self, code=None, message=None): # noqa: E501 + """ErrorEvent404ResponseError - a model defined in Swagger""" # noqa: E501 + self._code = None + self._message = None + self.discriminator = None + self.code = code + self.message = message + + @property + def code(self): + """Gets the code of this ErrorEvent404ResponseError. # noqa: E501 + + Error code: * `RequestNotFound` - request not found for specified id # noqa: E501 + + :return: The code of this ErrorEvent404ResponseError. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ErrorEvent404ResponseError. + + Error code: * `RequestNotFound` - request not found for specified id # noqa: E501 + + :param code: The code of this ErrorEvent404ResponseError. # noqa: E501 + :type: str + """ + if code is None: + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + allowed_values = ["RequestNotFound"] # noqa: E501 + if (code not in allowed_values): + raise ValueError( + "Invalid value for `code` ({0}), must be one of {1}" # noqa: E501 + .format(code, allowed_values) + ) + + self._code = code + + @property + def message(self): + """Gets the message of this ErrorEvent404ResponseError. # noqa: E501 + + + :return: The message of this ErrorEvent404ResponseError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ErrorEvent404ResponseError. + + + :param message: The message of this ErrorEvent404ResponseError. # noqa: E501 + :type: str + """ + if message is None: + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ErrorEvent404ResponseError, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ErrorEvent404ResponseError): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ErrorEvent404ResponseError): + return True + + return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/event_response.py b/fingerprint_pro_server_api_sdk/models/event_response.py index 7ac5dbfe..9936b8b0 100644 --- a/fingerprint_pro_server_api_sdk/models/event_response.py +++ b/fingerprint_pro_server_api_sdk/models/event_response.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/ip_location.py b/fingerprint_pro_server_api_sdk/models/ip_location.py index aae3e99a..ae3f36c8 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_location.py +++ b/fingerprint_pro_server_api_sdk/models/ip_location.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/ip_location_city.py b/fingerprint_pro_server_api_sdk/models/ip_location_city.py index 2f23412b..8f2d55d7 100644 --- a/fingerprint_pro_server_api_sdk/models/ip_location_city.py +++ b/fingerprint_pro_server_api_sdk/models/ip_location_city.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/location.py b/fingerprint_pro_server_api_sdk/models/location.py index 7da95259..c2b17193 100644 --- a/fingerprint_pro_server_api_sdk/models/location.py +++ b/fingerprint_pro_server_api_sdk/models/location.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/many_requests_response.py b/fingerprint_pro_server_api_sdk/models/many_requests_response.py index e89f1050..bda73fcf 100644 --- a/fingerprint_pro_server_api_sdk/models/many_requests_response.py +++ b/fingerprint_pro_server_api_sdk/models/many_requests_response.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/products_response.py b/fingerprint_pro_server_api_sdk/models/products_response.py index 21e66c60..01f3ee0f 100644 --- a/fingerprint_pro_server_api_sdk/models/products_response.py +++ b/fingerprint_pro_server_api_sdk/models/products_response.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/products_response_botd.py b/fingerprint_pro_server_api_sdk/models/products_response_botd.py index 329c7803..24125b60 100644 --- a/fingerprint_pro_server_api_sdk/models/products_response_botd.py +++ b/fingerprint_pro_server_api_sdk/models/products_response_botd.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -28,19 +28,24 @@ class ProductsResponseBotd(object): and the value is json key in definition. """ swagger_types = { - 'data': 'BotdResult' + 'data': 'BotdResult', + 'error': 'BotdError' } attribute_map = { - 'data': 'data' + 'data': 'data', + 'error': 'error' } - def __init__(self, data=None): # noqa: E501 + def __init__(self, data=None, error=None): # noqa: E501 """ProductsResponseBotd - a model defined in Swagger""" # noqa: E501 self._data = None + self._error = None self.discriminator = None if data is not None: self.data = data + if error is not None: + self.error = error @property def data(self): @@ -63,6 +68,27 @@ def data(self, data): self._data = data + @property + def error(self): + """Gets the error of this ProductsResponseBotd. # noqa: E501 + + + :return: The error of this ProductsResponseBotd. # noqa: E501 + :rtype: BotdError + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this ProductsResponseBotd. + + + :param error: The error of this ProductsResponseBotd. # noqa: E501 + :type: BotdError + """ + + self._error = error + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/fingerprint_pro_server_api_sdk/models/products_response_identification.py b/fingerprint_pro_server_api_sdk/models/products_response_identification.py index 05c533be..54088472 100644 --- a/fingerprint_pro_server_api_sdk/models/products_response_identification.py +++ b/fingerprint_pro_server_api_sdk/models/products_response_identification.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/products_response_identification_data.py b/fingerprint_pro_server_api_sdk/models/products_response_identification_data.py index f210618a..0fb17a9e 100644 --- a/fingerprint_pro_server_api_sdk/models/products_response_identification_data.py +++ b/fingerprint_pro_server_api_sdk/models/products_response_identification_data.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -40,8 +40,8 @@ class ProductsResponseIdentificationData(object): 'linked_id': 'str', 'confidence': 'Confidence', 'visitor_found': 'bool', - 'first_seen_at': 'StSeenAt', - 'last_seen_at': 'StSeenAt', + 'first_seen_at': 'SeenAt', + 'last_seen_at': 'SeenAt', 'visitor_id': 'str' } @@ -393,7 +393,7 @@ def first_seen_at(self): :return: The first_seen_at of this ProductsResponseIdentificationData. # noqa: E501 - :rtype: StSeenAt + :rtype: SeenAt """ return self._first_seen_at @@ -403,7 +403,7 @@ def first_seen_at(self, first_seen_at): :param first_seen_at: The first_seen_at of this ProductsResponseIdentificationData. # noqa: E501 - :type: StSeenAt + :type: SeenAt """ if first_seen_at is None: raise ValueError("Invalid value for `first_seen_at`, must not be `None`") # noqa: E501 @@ -416,7 +416,7 @@ def last_seen_at(self): :return: The last_seen_at of this ProductsResponseIdentificationData. # noqa: E501 - :rtype: StSeenAt + :rtype: SeenAt """ return self._last_seen_at @@ -426,7 +426,7 @@ def last_seen_at(self, last_seen_at): :param last_seen_at: The last_seen_at of this ProductsResponseIdentificationData. # noqa: E501 - :type: StSeenAt + :type: SeenAt """ if last_seen_at is None: raise ValueError("Invalid value for `last_seen_at`, must not be `None`") # noqa: E501 diff --git a/fingerprint_pro_server_api_sdk/models/response.py b/fingerprint_pro_server_api_sdk/models/response.py index 695ada23..f00ab3a6 100644 --- a/fingerprint_pro_server_api_sdk/models/response.py +++ b/fingerprint_pro_server_api_sdk/models/response.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/response_visits.py b/fingerprint_pro_server_api_sdk/models/response_visits.py index e579a12e..1e2e92c3 100644 --- a/fingerprint_pro_server_api_sdk/models/response_visits.py +++ b/fingerprint_pro_server_api_sdk/models/response_visits.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -40,8 +40,8 @@ class ResponseVisits(object): 'linked_id': 'str', 'confidence': 'Confidence', 'visitor_found': 'bool', - 'first_seen_at': 'StSeenAt', - 'last_seen_at': 'StSeenAt' + 'first_seen_at': 'SeenAt', + 'last_seen_at': 'SeenAt' } attribute_map = { @@ -390,7 +390,7 @@ def first_seen_at(self): :return: The first_seen_at of this ResponseVisits. # noqa: E501 - :rtype: StSeenAt + :rtype: SeenAt """ return self._first_seen_at @@ -400,7 +400,7 @@ def first_seen_at(self, first_seen_at): :param first_seen_at: The first_seen_at of this ResponseVisits. # noqa: E501 - :type: StSeenAt + :type: SeenAt """ if first_seen_at is None: raise ValueError("Invalid value for `first_seen_at`, must not be `None`") # noqa: E501 @@ -413,7 +413,7 @@ def last_seen_at(self): :return: The last_seen_at of this ResponseVisits. # noqa: E501 - :rtype: StSeenAt + :rtype: SeenAt """ return self._last_seen_at @@ -423,7 +423,7 @@ def last_seen_at(self, last_seen_at): :param last_seen_at: The last_seen_at of this ResponseVisits. # noqa: E501 - :type: StSeenAt + :type: SeenAt """ if last_seen_at is None: raise ValueError("Invalid value for `last_seen_at`, must not be `None`") # noqa: E501 diff --git a/fingerprint_pro_server_api_sdk/models/st_seen_at.py b/fingerprint_pro_server_api_sdk/models/seen_at.py similarity index 76% rename from fingerprint_pro_server_api_sdk/models/st_seen_at.py rename to fingerprint_pro_server_api_sdk/models/seen_at.py index 94161f65..cc8f3b3d 100644 --- a/fingerprint_pro_server_api_sdk/models/st_seen_at.py +++ b/fingerprint_pro_server_api_sdk/models/seen_at.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -15,7 +15,7 @@ import six -class StSeenAt(object): +class SeenAt(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. @@ -38,7 +38,7 @@ class StSeenAt(object): } def __init__(self, _global=None, subscription=None): # noqa: E501 - """StSeenAt - a model defined in Swagger""" # noqa: E501 + """SeenAt - a model defined in Swagger""" # noqa: E501 self.__global = None self._subscription = None self.discriminator = None @@ -47,20 +47,20 @@ def __init__(self, _global=None, subscription=None): # noqa: E501 @property def _global(self): - """Gets the _global of this StSeenAt. # noqa: E501 + """Gets the _global of this SeenAt. # noqa: E501 - :return: The _global of this StSeenAt. # noqa: E501 + :return: The _global of this SeenAt. # noqa: E501 :rtype: datetime """ return self.__global @_global.setter def _global(self, _global): - """Sets the _global of this StSeenAt. + """Sets the _global of this SeenAt. - :param _global: The _global of this StSeenAt. # noqa: E501 + :param _global: The _global of this SeenAt. # noqa: E501 :type: datetime """ @@ -68,20 +68,20 @@ def _global(self, _global): @property def subscription(self): - """Gets the subscription of this StSeenAt. # noqa: E501 + """Gets the subscription of this SeenAt. # noqa: E501 - :return: The subscription of this StSeenAt. # noqa: E501 + :return: The subscription of this SeenAt. # noqa: E501 :rtype: datetime """ return self._subscription @subscription.setter def subscription(self, subscription): - """Sets the subscription of this StSeenAt. + """Sets the subscription of this SeenAt. - :param subscription: The subscription of this StSeenAt. # noqa: E501 + :param subscription: The subscription of this SeenAt. # noqa: E501 :type: datetime """ @@ -108,7 +108,7 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(StSeenAt, dict): + if issubclass(SeenAt, dict): for key, value in self.items(): result[key] = value @@ -124,14 +124,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, StSeenAt): + if not isinstance(other, SeenAt): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, StSeenAt): + if not isinstance(other, SeenAt): return True return self.to_dict() != other.to_dict() diff --git a/fingerprint_pro_server_api_sdk/models/subdivision.py b/fingerprint_pro_server_api_sdk/models/subdivision.py index 590789bd..8df66eee 100644 --- a/fingerprint_pro_server_api_sdk/models/subdivision.py +++ b/fingerprint_pro_server_api_sdk/models/subdivision.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/fingerprint_pro_server_api_sdk/models/visit.py b/fingerprint_pro_server_api_sdk/models/visit.py index b49154e2..ea70005b 100644 --- a/fingerprint_pro_server_api_sdk/models/visit.py +++ b/fingerprint_pro_server_api_sdk/models/visit.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -40,8 +40,8 @@ class Visit(object): 'linked_id': 'str', 'confidence': 'Confidence', 'visitor_found': 'bool', - 'first_seen_at': 'StSeenAt', - 'last_seen_at': 'StSeenAt' + 'first_seen_at': 'SeenAt', + 'last_seen_at': 'SeenAt' } attribute_map = { @@ -389,7 +389,7 @@ def first_seen_at(self): :return: The first_seen_at of this Visit. # noqa: E501 - :rtype: StSeenAt + :rtype: SeenAt """ return self._first_seen_at @@ -399,7 +399,7 @@ def first_seen_at(self, first_seen_at): :param first_seen_at: The first_seen_at of this Visit. # noqa: E501 - :type: StSeenAt + :type: SeenAt """ if first_seen_at is None: raise ValueError("Invalid value for `first_seen_at`, must not be `None`") # noqa: E501 @@ -412,7 +412,7 @@ def last_seen_at(self): :return: The last_seen_at of this Visit. # noqa: E501 - :rtype: StSeenAt + :rtype: SeenAt """ return self._last_seen_at @@ -422,7 +422,7 @@ def last_seen_at(self, last_seen_at): :param last_seen_at: The last_seen_at of this Visit. # noqa: E501 - :type: StSeenAt + :type: SeenAt """ if last_seen_at is None: raise ValueError("Invalid value for `last_seen_at`, must not be `None`") # noqa: E501 diff --git a/fingerprint_pro_server_api_sdk/models/webhook_visit.py b/fingerprint_pro_server_api_sdk/models/webhook_visit.py index 0b0f6ebf..f62089fb 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook_visit.py +++ b/fingerprint_pro_server_api_sdk/models/webhook_visit.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com @@ -42,8 +42,8 @@ class WebhookVisit(object): 'linked_id': 'str', 'confidence': 'Confidence', 'visitor_found': 'bool', - 'first_seen_at': 'StSeenAt', - 'last_seen_at': 'StSeenAt' + 'first_seen_at': 'SeenAt', + 'last_seen_at': 'SeenAt' } attribute_map = { @@ -442,7 +442,7 @@ def first_seen_at(self): :return: The first_seen_at of this WebhookVisit. # noqa: E501 - :rtype: StSeenAt + :rtype: SeenAt """ return self._first_seen_at @@ -452,7 +452,7 @@ def first_seen_at(self, first_seen_at): :param first_seen_at: The first_seen_at of this WebhookVisit. # noqa: E501 - :type: StSeenAt + :type: SeenAt """ if first_seen_at is None: raise ValueError("Invalid value for `first_seen_at`, must not be `None`") # noqa: E501 @@ -465,7 +465,7 @@ def last_seen_at(self): :return: The last_seen_at of this WebhookVisit. # noqa: E501 - :rtype: StSeenAt + :rtype: SeenAt """ return self._last_seen_at @@ -475,7 +475,7 @@ def last_seen_at(self, last_seen_at): :param last_seen_at: The last_seen_at of this WebhookVisit. # noqa: E501 - :type: StSeenAt + :type: SeenAt """ if last_seen_at is None: raise ValueError("Invalid value for `last_seen_at`, must not be `None`") # noqa: E501 diff --git a/fingerprint_pro_server_api_sdk/rest.py b/fingerprint_pro_server_api_sdk/rest.py index 3a96b8bd..1538b2ee 100644 --- a/fingerprint_pro_server_api_sdk/rest.py +++ b/fingerprint_pro_server_api_sdk/rest.py @@ -3,7 +3,7 @@ """ Fingerprint Pro Server API - Fingerprint Pro Server API provides a way for validating visitors’ data issued by Fingerprint Pro. # noqa: E501 + Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios. # noqa: E501 OpenAPI spec version: 3 Contact: support@fingerprint.com diff --git a/generate.sh b/generate.sh index 60915409..84f25c97 100755 --- a/generate.sh +++ b/generate.sh @@ -12,4 +12,6 @@ done # jar was downloaded from here https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.34/ +rm docs/* +rm -rf fingerprint_pro_server_api_sdk/* java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l python -i ./res/fingerprint-server-api.yaml -o ./ -c config.json -DpackageVersion=$VERSION diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 07807805..d7739798 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -2,8 +2,9 @@ openapi: 3.0.3 info: title: Fingerprint Pro Server API description: >- - Fingerprint Pro Server API provides a way for validating visitors’ data - issued by Fingerprint Pro. + Fingerprint Pro Server API allows you to get information about visitors and + about individual events in a server environment. This API can be used for + data exports, decision-making, and data analysis scenarios. version: '3' contact: name: Fingerprint Support @@ -28,17 +29,17 @@ paths: get: tags: - Fingerprint - summary: Get event by request ID + summary: Get event by requestId description: >- This endpoint allows you to get events with all the information from - each activated product - BOTD and Fingerprinting. Use the requestId as a - URL path :request_id parameter. This API method is scoped to a request, - i.e. all returned information is by requestId. + each activated product (Fingerprint Pro or Bot Detection). Use the + requestId as a URL path :request_id parameter. This API method is scoped + to a request, i.e. all returned information is by requestId. operationId: getEvent parameters: - name: request_id in: path - description: Request ID + description: requestId is the unique identifier of each request required: true schema: type: string @@ -50,7 +51,7 @@ paths: schema: $ref: '#/components/schemas/EventResponse' examples: - example: + fullResponse: summary: Example response value: products: @@ -105,39 +106,91 @@ paths: url: https://www.example.com/login ip: 61.127.217.15 time: '2019-05-21T16:40:13Z' - '400': - description: Bad Request + withBotdError: + summary: Example response with BotD error + value: + products: + identification: + data: + visitorId: Ibk1527CUFmcnjLwIs4A9 + requestId: 0KSh65EnVoB85JBmloQK + incognito: true + linkedId: somelinkedId + time: '2019-05-21T16:40:13Z' + timestamp: 1582299576512 + url: https://www.example.com/login + ip: 61.127.217.15 + ipLocation: + accuracyRadius: 10 + latitude: 49.982 + longitude: 36.2566 + postalCode: '61202' + timezone: Europe/Dusseldorf + city: + name: Dusseldorf + continent: + code: EU + name: Europe + country: + code: DE + name: Germany + subdivisions: + - isoCode: '63' + name: North Rhine-Westphalia + browserDetails: + browserName: Chrome + browserMajorVersion: '74' + browserFullVersion: 74.0.3729 + os: Windows + osVersion: '7' + device: Other + userAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) .... + confidence: + score: 0.97 + visitorFound: true + firstSeenAt: + global: '2022-03-16T11:26:45.362Z' + subscription: '2022-03-16T11:31:01.101Z' + lastSeenAt: + global: '2022-03-16T11:28:34.023Z' + subscription: null + botd: + error: + code: Failed + message: internal server error + '403': + description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/ErrorEvent403Response' examples: example: summary: Example response value: error: - code: RequestIdCannotBeParsed - message: invalid format of request id - '403': - description: Forbidden + code: TokenRequired + message: secret key is required + '404': + description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/ErrorResponse' + $ref: '#/components/schemas/ErrorEvent404Response' examples: example: summary: Example response value: error: - code: TokenRequired - message: secret key is required + code: RequestNotFound + message: request id is not found '429': description: Too Many Requests headers: Retry-After: description: >- - Indicates how long the user should wait before making a - follow-up request. + Indicates how long the user should wait in seconds before + attempting the next request. schema: type: integer format: int32 @@ -151,6 +204,7 @@ paths: tags: - Fingerprint operationId: getVisits + summary: Get visits by visitorId description: >- This endpoint allows you to get a history of visits with all available information. Use the visitorId as a URL path parameter. This API method @@ -163,12 +217,12 @@ paths: type: string example: uYIm7Ksp5rf00SllPhFp - name: request_id - description: Filter events by requestId + description: Filter visits by requestId in: query schema: type: string - name: linked_id - description: Filter events by custom identifier + description: Filter visits by custom identifier in: query schema: type: string @@ -2872,13 +2926,22 @@ paths: lastSeenAt: global: '2022-03-08T12:33:05.677Z' subscription: '2022-03-08T12:33:05.677Z' + '403': + description: Forbidden. Probably ApiKey is missed or provided the wrong one. + content: + text/html: + schema: + type: string + example: > +