agentcat-api 0.0.1__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentcat_api-1.0.0/MANIFEST.in +1 -0
- agentcat_api-1.0.0/PKG-INFO +121 -0
- agentcat_api-1.0.0/agentcat_api/__init__.py +61 -0
- agentcat_api-1.0.0/agentcat_api/api/__init__.py +6 -0
- agentcat_api-1.0.0/agentcat_api/api/events_api.py +324 -0
- agentcat_api-1.0.0/agentcat_api/api/notifications_api.py +344 -0
- agentcat_api-1.0.0/agentcat_api/api_client.py +801 -0
- agentcat_api-1.0.0/agentcat_api/api_response.py +21 -0
- agentcat_api-1.0.0/agentcat_api/configuration.py +602 -0
- agentcat_api-1.0.0/agentcat_api/exceptions.py +216 -0
- agentcat_api-1.0.0/agentcat_api/models/__init__.py +22 -0
- agentcat_api-1.0.0/agentcat_api/models/error.py +87 -0
- agentcat_api-1.0.0/agentcat_api/models/event_accepted_response.py +87 -0
- agentcat_api-1.0.0/agentcat_api/models/publish_event_request.py +166 -0
- agentcat_api-1.0.0/agentcat_api/models/query_timeout.py +96 -0
- agentcat_api-1.0.0/agentcat_api/models/unsubscribe_request_request.py +88 -0
- agentcat_api-1.0.0/agentcat_api/models/validation_error_value.py +143 -0
- agentcat_api-1.0.0/agentcat_api/rest.py +258 -0
- agentcat_api-1.0.0/agentcat_api/test/__init__.py +0 -0
- agentcat_api-1.0.0/agentcat_api/test/test_error.py +52 -0
- agentcat_api-1.0.0/agentcat_api/test/test_event_accepted_response.py +51 -0
- agentcat_api-1.0.0/agentcat_api/test/test_events_api.py +38 -0
- agentcat_api-1.0.0/agentcat_api/test/test_notifications_api.py +38 -0
- agentcat_api-1.0.0/agentcat_api/test/test_publish_event_request.py +79 -0
- agentcat_api-1.0.0/agentcat_api/test/test_query_timeout.py +54 -0
- agentcat_api-1.0.0/agentcat_api/test/test_unsubscribe_request_request.py +51 -0
- agentcat_api-1.0.0/agentcat_api/test/test_validation_error_value.py +50 -0
- agentcat_api-1.0.0/agentcat_api.egg-info/PKG-INFO +121 -0
- agentcat_api-1.0.0/agentcat_api.egg-info/SOURCES.txt +33 -0
- agentcat_api-1.0.0/agentcat_api.egg-info/dependency_links.txt +1 -0
- agentcat_api-1.0.0/agentcat_api.egg-info/requires.txt +3 -0
- agentcat_api-1.0.0/agentcat_api.egg-info/top_level.txt +1 -0
- agentcat_api-1.0.0/agentcat_api_README.md +108 -0
- agentcat_api-1.0.0/setup.cfg +4 -0
- agentcat_api-1.0.0/setup.py +24 -0
- agentcat_api-0.0.1/PKG-INFO +0 -16
- agentcat_api-0.0.1/README.md +0 -5
- agentcat_api-0.0.1/pyproject.toml +0 -19
- agentcat_api-0.0.1/src/agentcat_api/__init__.py +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include agentcat_api_README.md
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentcat_api
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
License: MIT
|
|
5
|
+
Description-Content-Type: text/markdown
|
|
6
|
+
Requires-Dist: urllib3<3.0.0,>=2.1.0
|
|
7
|
+
Requires-Dist: python-dateutil
|
|
8
|
+
Requires-Dist: pydantic<3,>=2.0.0
|
|
9
|
+
Dynamic: description
|
|
10
|
+
Dynamic: description-content-type
|
|
11
|
+
Dynamic: license
|
|
12
|
+
Dynamic: requires-dist
|
|
13
|
+
|
|
14
|
+
# agentcat-api
|
|
15
|
+
API for AgentCat application
|
|
16
|
+
|
|
17
|
+
The `agentcat_api` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
18
|
+
|
|
19
|
+
- API version: v1
|
|
20
|
+
- Package version: 1.0.0
|
|
21
|
+
- Generator version: 7.14.0
|
|
22
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
23
|
+
|
|
24
|
+
## Requirements.
|
|
25
|
+
|
|
26
|
+
Python 3.9+
|
|
27
|
+
|
|
28
|
+
## Installation & Usage
|
|
29
|
+
|
|
30
|
+
This python library package is generated without supporting files like setup.py or requirements files
|
|
31
|
+
|
|
32
|
+
To be able to use it, you will need these dependencies in your own package that uses this library:
|
|
33
|
+
|
|
34
|
+
* urllib3 >= 2.1.0, < 3.0.0
|
|
35
|
+
* python-dateutil >= 2.8.2
|
|
36
|
+
* pydantic >= 2
|
|
37
|
+
* typing-extensions >= 4.7.1
|
|
38
|
+
|
|
39
|
+
## Getting Started
|
|
40
|
+
|
|
41
|
+
In your own code, to use this library to connect and interact with agentcat-api,
|
|
42
|
+
you can run the following:
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
|
|
46
|
+
import agentcat_api
|
|
47
|
+
from agentcat_api.rest import ApiException
|
|
48
|
+
from pprint import pprint
|
|
49
|
+
|
|
50
|
+
# Defining the host is optional and defaults to http://localhost:8000
|
|
51
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
52
|
+
configuration = agentcat_api.Configuration(
|
|
53
|
+
host = "http://localhost:8000"
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
# The client must configure the authentication and authorization parameters
|
|
57
|
+
# in accordance with the API server security policy.
|
|
58
|
+
# Examples for each auth method are provided below, use the example that
|
|
59
|
+
# satisfies your auth use case.
|
|
60
|
+
|
|
61
|
+
# Configure API key authorization: tokenAuth
|
|
62
|
+
configuration.api_key['tokenAuth'] = os.environ["API_KEY"]
|
|
63
|
+
|
|
64
|
+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
|
|
65
|
+
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# Enter a context with an instance of the API client
|
|
69
|
+
with agentcat_api.ApiClient(configuration) as api_client:
|
|
70
|
+
# Create an instance of the API class
|
|
71
|
+
api_instance = agentcat_api.EventsApi(api_client)
|
|
72
|
+
publish_event_request = agentcat_api.PublishEventRequest() # PublishEventRequest | (optional)
|
|
73
|
+
|
|
74
|
+
try:
|
|
75
|
+
# Publish analytics event
|
|
76
|
+
api_response = api_instance.publish_event(publish_event_request=publish_event_request)
|
|
77
|
+
print("The response of EventsApi->publish_event:\n")
|
|
78
|
+
pprint(api_response)
|
|
79
|
+
except ApiException as e:
|
|
80
|
+
print("Exception when calling EventsApi->publish_event: %s\n" % e)
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Documentation for API Endpoints
|
|
85
|
+
|
|
86
|
+
All URIs are relative to *http://localhost:8000*
|
|
87
|
+
|
|
88
|
+
Class | Method | HTTP request | Description
|
|
89
|
+
------------ | ------------- | ------------- | -------------
|
|
90
|
+
*EventsApi* | [**publish_event**](agentcat_api/docs/EventsApi.md#publish_event) | **POST** /v1/public/events/ | Publish analytics event
|
|
91
|
+
*NotificationsApi* | [**unsubscribe_notification**](agentcat_api/docs/NotificationsApi.md#unsubscribe_notification) | **POST** /v1/public/notifications/unsubscribe | Disable an email notification type for the token's user
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## Documentation For Models
|
|
95
|
+
|
|
96
|
+
- [Error](agentcat_api/docs/Error.md)
|
|
97
|
+
- [EventAcceptedResponse](agentcat_api/docs/EventAcceptedResponse.md)
|
|
98
|
+
- [PublishEventRequest](agentcat_api/docs/PublishEventRequest.md)
|
|
99
|
+
- [QueryTimeout](agentcat_api/docs/QueryTimeout.md)
|
|
100
|
+
- [UnsubscribeRequestRequest](agentcat_api/docs/UnsubscribeRequestRequest.md)
|
|
101
|
+
- [ValidationErrorValue](agentcat_api/docs/ValidationErrorValue.md)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
<a id="documentation-for-authorization"></a>
|
|
105
|
+
## Documentation For Authorization
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
Authentication schemes defined for the API:
|
|
109
|
+
<a id="tokenAuth"></a>
|
|
110
|
+
### tokenAuth
|
|
111
|
+
|
|
112
|
+
- **Type**: API key
|
|
113
|
+
- **API key parameter name**: Authorization
|
|
114
|
+
- **Location**: HTTP header
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## Author
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
AgentCat API
|
|
7
|
+
|
|
8
|
+
API for AgentCat application
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: v1
|
|
11
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
12
|
+
|
|
13
|
+
Do not edit the class manually.
|
|
14
|
+
""" # noqa: E501
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
__version__ = "1.0.0"
|
|
18
|
+
|
|
19
|
+
# Define package exports
|
|
20
|
+
__all__ = [
|
|
21
|
+
"EventsApi",
|
|
22
|
+
"NotificationsApi",
|
|
23
|
+
"ApiResponse",
|
|
24
|
+
"ApiClient",
|
|
25
|
+
"Configuration",
|
|
26
|
+
"OpenApiException",
|
|
27
|
+
"ApiTypeError",
|
|
28
|
+
"ApiValueError",
|
|
29
|
+
"ApiKeyError",
|
|
30
|
+
"ApiAttributeError",
|
|
31
|
+
"ApiException",
|
|
32
|
+
"Error",
|
|
33
|
+
"EventAcceptedResponse",
|
|
34
|
+
"PublishEventRequest",
|
|
35
|
+
"QueryTimeout",
|
|
36
|
+
"UnsubscribeRequestRequest",
|
|
37
|
+
"ValidationErrorValue",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
# import apis into sdk package
|
|
41
|
+
from agentcat_api.api.events_api import EventsApi as EventsApi
|
|
42
|
+
from agentcat_api.api.notifications_api import NotificationsApi as NotificationsApi
|
|
43
|
+
|
|
44
|
+
# import ApiClient
|
|
45
|
+
from agentcat_api.api_response import ApiResponse as ApiResponse
|
|
46
|
+
from agentcat_api.api_client import ApiClient as ApiClient
|
|
47
|
+
from agentcat_api.configuration import Configuration as Configuration
|
|
48
|
+
from agentcat_api.exceptions import OpenApiException as OpenApiException
|
|
49
|
+
from agentcat_api.exceptions import ApiTypeError as ApiTypeError
|
|
50
|
+
from agentcat_api.exceptions import ApiValueError as ApiValueError
|
|
51
|
+
from agentcat_api.exceptions import ApiKeyError as ApiKeyError
|
|
52
|
+
from agentcat_api.exceptions import ApiAttributeError as ApiAttributeError
|
|
53
|
+
from agentcat_api.exceptions import ApiException as ApiException
|
|
54
|
+
|
|
55
|
+
# import models into sdk package
|
|
56
|
+
from agentcat_api.models.error import Error as Error
|
|
57
|
+
from agentcat_api.models.event_accepted_response import EventAcceptedResponse as EventAcceptedResponse
|
|
58
|
+
from agentcat_api.models.publish_event_request import PublishEventRequest as PublishEventRequest
|
|
59
|
+
from agentcat_api.models.query_timeout import QueryTimeout as QueryTimeout
|
|
60
|
+
from agentcat_api.models.unsubscribe_request_request import UnsubscribeRequestRequest as UnsubscribeRequestRequest
|
|
61
|
+
from agentcat_api.models.validation_error_value import ValidationErrorValue as ValidationErrorValue
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
AgentCat API
|
|
5
|
+
|
|
6
|
+
API for AgentCat application
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from typing import Optional
|
|
20
|
+
from agentcat_api.models.event_accepted_response import EventAcceptedResponse
|
|
21
|
+
from agentcat_api.models.publish_event_request import PublishEventRequest
|
|
22
|
+
|
|
23
|
+
from agentcat_api.api_client import ApiClient, RequestSerialized
|
|
24
|
+
from agentcat_api.api_response import ApiResponse
|
|
25
|
+
from agentcat_api.rest import RESTResponseType
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class EventsApi:
|
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
30
|
+
Ref: https://openapi-generator.tech
|
|
31
|
+
|
|
32
|
+
Do not edit the class manually.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(self, api_client=None) -> None:
|
|
36
|
+
if api_client is None:
|
|
37
|
+
api_client = ApiClient.get_default()
|
|
38
|
+
self.api_client = api_client
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@validate_call
|
|
42
|
+
def publish_event(
|
|
43
|
+
self,
|
|
44
|
+
publish_event_request: Optional[PublishEventRequest] = None,
|
|
45
|
+
_request_timeout: Union[
|
|
46
|
+
None,
|
|
47
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
48
|
+
Tuple[
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
51
|
+
]
|
|
52
|
+
] = None,
|
|
53
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
54
|
+
_content_type: Optional[StrictStr] = None,
|
|
55
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
57
|
+
) -> EventAcceptedResponse:
|
|
58
|
+
"""Publish analytics event
|
|
59
|
+
|
|
60
|
+
Submit analytics events for a project. Returns immediately with 202 Accepted.
|
|
61
|
+
|
|
62
|
+
:param publish_event_request:
|
|
63
|
+
:type publish_event_request: PublishEventRequest
|
|
64
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
65
|
+
number provided, it will be total request
|
|
66
|
+
timeout. It can also be a pair (tuple) of
|
|
67
|
+
(connection, read) timeouts.
|
|
68
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
69
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
70
|
+
request; this effectively ignores the
|
|
71
|
+
authentication in the spec for a single request.
|
|
72
|
+
:type _request_auth: dict, optional
|
|
73
|
+
:param _content_type: force content-type for the request.
|
|
74
|
+
:type _content_type: str, Optional
|
|
75
|
+
:param _headers: set to override the headers for a single
|
|
76
|
+
request; this effectively ignores the headers
|
|
77
|
+
in the spec for a single request.
|
|
78
|
+
:type _headers: dict, optional
|
|
79
|
+
:param _host_index: set to override the host_index for a single
|
|
80
|
+
request; this effectively ignores the host_index
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _host_index: int, optional
|
|
83
|
+
:return: Returns the result object.
|
|
84
|
+
""" # noqa: E501
|
|
85
|
+
|
|
86
|
+
_param = self._publish_event_serialize(
|
|
87
|
+
publish_event_request=publish_event_request,
|
|
88
|
+
_request_auth=_request_auth,
|
|
89
|
+
_content_type=_content_type,
|
|
90
|
+
_headers=_headers,
|
|
91
|
+
_host_index=_host_index
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
95
|
+
'202': "EventAcceptedResponse",
|
|
96
|
+
'400': "object",
|
|
97
|
+
'404': "object",
|
|
98
|
+
'401': "Error",
|
|
99
|
+
'403': "Error",
|
|
100
|
+
}
|
|
101
|
+
response_data = self.api_client.call_api(
|
|
102
|
+
*_param,
|
|
103
|
+
_request_timeout=_request_timeout
|
|
104
|
+
)
|
|
105
|
+
response_data.read()
|
|
106
|
+
return self.api_client.response_deserialize(
|
|
107
|
+
response_data=response_data,
|
|
108
|
+
response_types_map=_response_types_map,
|
|
109
|
+
).data
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@validate_call
|
|
113
|
+
def publish_event_with_http_info(
|
|
114
|
+
self,
|
|
115
|
+
publish_event_request: Optional[PublishEventRequest] = None,
|
|
116
|
+
_request_timeout: Union[
|
|
117
|
+
None,
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
119
|
+
Tuple[
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
122
|
+
]
|
|
123
|
+
] = None,
|
|
124
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
125
|
+
_content_type: Optional[StrictStr] = None,
|
|
126
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
128
|
+
) -> ApiResponse[EventAcceptedResponse]:
|
|
129
|
+
"""Publish analytics event
|
|
130
|
+
|
|
131
|
+
Submit analytics events for a project. Returns immediately with 202 Accepted.
|
|
132
|
+
|
|
133
|
+
:param publish_event_request:
|
|
134
|
+
:type publish_event_request: PublishEventRequest
|
|
135
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
136
|
+
number provided, it will be total request
|
|
137
|
+
timeout. It can also be a pair (tuple) of
|
|
138
|
+
(connection, read) timeouts.
|
|
139
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
140
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
141
|
+
request; this effectively ignores the
|
|
142
|
+
authentication in the spec for a single request.
|
|
143
|
+
:type _request_auth: dict, optional
|
|
144
|
+
:param _content_type: force content-type for the request.
|
|
145
|
+
:type _content_type: str, Optional
|
|
146
|
+
:param _headers: set to override the headers for a single
|
|
147
|
+
request; this effectively ignores the headers
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _headers: dict, optional
|
|
150
|
+
:param _host_index: set to override the host_index for a single
|
|
151
|
+
request; this effectively ignores the host_index
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _host_index: int, optional
|
|
154
|
+
:return: Returns the result object.
|
|
155
|
+
""" # noqa: E501
|
|
156
|
+
|
|
157
|
+
_param = self._publish_event_serialize(
|
|
158
|
+
publish_event_request=publish_event_request,
|
|
159
|
+
_request_auth=_request_auth,
|
|
160
|
+
_content_type=_content_type,
|
|
161
|
+
_headers=_headers,
|
|
162
|
+
_host_index=_host_index
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
166
|
+
'202': "EventAcceptedResponse",
|
|
167
|
+
'400': "object",
|
|
168
|
+
'404': "object",
|
|
169
|
+
'401': "Error",
|
|
170
|
+
'403': "Error",
|
|
171
|
+
}
|
|
172
|
+
response_data = self.api_client.call_api(
|
|
173
|
+
*_param,
|
|
174
|
+
_request_timeout=_request_timeout
|
|
175
|
+
)
|
|
176
|
+
response_data.read()
|
|
177
|
+
return self.api_client.response_deserialize(
|
|
178
|
+
response_data=response_data,
|
|
179
|
+
response_types_map=_response_types_map,
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@validate_call
|
|
184
|
+
def publish_event_without_preload_content(
|
|
185
|
+
self,
|
|
186
|
+
publish_event_request: Optional[PublishEventRequest] = None,
|
|
187
|
+
_request_timeout: Union[
|
|
188
|
+
None,
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
190
|
+
Tuple[
|
|
191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
193
|
+
]
|
|
194
|
+
] = None,
|
|
195
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
196
|
+
_content_type: Optional[StrictStr] = None,
|
|
197
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
198
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
199
|
+
) -> RESTResponseType:
|
|
200
|
+
"""Publish analytics event
|
|
201
|
+
|
|
202
|
+
Submit analytics events for a project. Returns immediately with 202 Accepted.
|
|
203
|
+
|
|
204
|
+
:param publish_event_request:
|
|
205
|
+
:type publish_event_request: PublishEventRequest
|
|
206
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
207
|
+
number provided, it will be total request
|
|
208
|
+
timeout. It can also be a pair (tuple) of
|
|
209
|
+
(connection, read) timeouts.
|
|
210
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
211
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
212
|
+
request; this effectively ignores the
|
|
213
|
+
authentication in the spec for a single request.
|
|
214
|
+
:type _request_auth: dict, optional
|
|
215
|
+
:param _content_type: force content-type for the request.
|
|
216
|
+
:type _content_type: str, Optional
|
|
217
|
+
:param _headers: set to override the headers for a single
|
|
218
|
+
request; this effectively ignores the headers
|
|
219
|
+
in the spec for a single request.
|
|
220
|
+
:type _headers: dict, optional
|
|
221
|
+
:param _host_index: set to override the host_index for a single
|
|
222
|
+
request; this effectively ignores the host_index
|
|
223
|
+
in the spec for a single request.
|
|
224
|
+
:type _host_index: int, optional
|
|
225
|
+
:return: Returns the result object.
|
|
226
|
+
""" # noqa: E501
|
|
227
|
+
|
|
228
|
+
_param = self._publish_event_serialize(
|
|
229
|
+
publish_event_request=publish_event_request,
|
|
230
|
+
_request_auth=_request_auth,
|
|
231
|
+
_content_type=_content_type,
|
|
232
|
+
_headers=_headers,
|
|
233
|
+
_host_index=_host_index
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
237
|
+
'202': "EventAcceptedResponse",
|
|
238
|
+
'400': "object",
|
|
239
|
+
'404': "object",
|
|
240
|
+
'401': "Error",
|
|
241
|
+
'403': "Error",
|
|
242
|
+
}
|
|
243
|
+
response_data = self.api_client.call_api(
|
|
244
|
+
*_param,
|
|
245
|
+
_request_timeout=_request_timeout
|
|
246
|
+
)
|
|
247
|
+
return response_data.response
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def _publish_event_serialize(
|
|
251
|
+
self,
|
|
252
|
+
publish_event_request,
|
|
253
|
+
_request_auth,
|
|
254
|
+
_content_type,
|
|
255
|
+
_headers,
|
|
256
|
+
_host_index,
|
|
257
|
+
) -> RequestSerialized:
|
|
258
|
+
|
|
259
|
+
_host = None
|
|
260
|
+
|
|
261
|
+
_collection_formats: Dict[str, str] = {
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
_path_params: Dict[str, str] = {}
|
|
265
|
+
_query_params: List[Tuple[str, str]] = []
|
|
266
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
267
|
+
_form_params: List[Tuple[str, str]] = []
|
|
268
|
+
_files: Dict[
|
|
269
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
270
|
+
] = {}
|
|
271
|
+
_body_params: Optional[bytes] = None
|
|
272
|
+
|
|
273
|
+
# process the path parameters
|
|
274
|
+
# process the query parameters
|
|
275
|
+
# process the header parameters
|
|
276
|
+
# process the form parameters
|
|
277
|
+
# process the body parameter
|
|
278
|
+
if publish_event_request is not None:
|
|
279
|
+
_body_params = publish_event_request
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
# set the HTTP header `Accept`
|
|
283
|
+
if 'Accept' not in _header_params:
|
|
284
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
285
|
+
[
|
|
286
|
+
'application/json'
|
|
287
|
+
]
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
# set the HTTP header `Content-Type`
|
|
291
|
+
if _content_type:
|
|
292
|
+
_header_params['Content-Type'] = _content_type
|
|
293
|
+
else:
|
|
294
|
+
_default_content_type = (
|
|
295
|
+
self.api_client.select_header_content_type(
|
|
296
|
+
[
|
|
297
|
+
'application/json'
|
|
298
|
+
]
|
|
299
|
+
)
|
|
300
|
+
)
|
|
301
|
+
if _default_content_type is not None:
|
|
302
|
+
_header_params['Content-Type'] = _default_content_type
|
|
303
|
+
|
|
304
|
+
# authentication setting
|
|
305
|
+
_auth_settings: List[str] = [
|
|
306
|
+
'tokenAuth'
|
|
307
|
+
]
|
|
308
|
+
|
|
309
|
+
return self.api_client.param_serialize(
|
|
310
|
+
method='POST',
|
|
311
|
+
resource_path='/v1/public/events/',
|
|
312
|
+
path_params=_path_params,
|
|
313
|
+
query_params=_query_params,
|
|
314
|
+
header_params=_header_params,
|
|
315
|
+
body=_body_params,
|
|
316
|
+
post_params=_form_params,
|
|
317
|
+
files=_files,
|
|
318
|
+
auth_settings=_auth_settings,
|
|
319
|
+
collection_formats=_collection_formats,
|
|
320
|
+
_host=_host,
|
|
321
|
+
_request_auth=_request_auth
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
|