rxfoundry.clients.swifty-receiver-api 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.
- rxfoundry_clients_swifty_receiver_api-1.0.0/PKG-INFO +23 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/README.md +124 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/pyproject.toml +89 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/__init__.py +0 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/__init__.py +0 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/__init__.py +38 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/api/__init__.py +6 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/api/async_api.py +312 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/api/version_api.py +282 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/api_client.py +798 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/api_response.py +21 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/configuration.py +583 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/exceptions.py +217 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/models/__init__.py +20 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/models/asynchronous_response.py +92 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/models/message.py +106 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/models/version.py +88 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/py.typed +0 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/rest.py +259 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry.clients.swifty_receiver_api.egg-info/PKG-INFO +23 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry.clients.swifty_receiver_api.egg-info/SOURCES.txt +30 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry.clients.swifty_receiver_api.egg-info/dependency_links.txt +1 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry.clients.swifty_receiver_api.egg-info/requires.txt +4 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry.clients.swifty_receiver_api.egg-info/top_level.txt +1 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/setup.cfg +7 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/setup.py +50 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/test/test_async_api.py +39 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/test/test_asynchronous_response.py +54 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/test/test_message.py +56 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/test/test_version.py +52 -0
- rxfoundry_clients_swifty_receiver_api-1.0.0/test/test_version_api.py +39 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rxfoundry.clients.swifty-receiver-api
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Swifty Receiver API
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: RxFoundry Team
|
|
7
|
+
Author-email: paul.tindall@rxfoundry.com
|
|
8
|
+
Keywords: OpenAPI,OpenAPI-Generator,Swifty Receiver API
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: urllib3<3.0.0,>=2.1.0
|
|
11
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
12
|
+
Requires-Dist: pydantic>=2
|
|
13
|
+
Requires-Dist: typing-extensions>=4.7.1
|
|
14
|
+
Dynamic: author
|
|
15
|
+
Dynamic: author-email
|
|
16
|
+
Dynamic: description
|
|
17
|
+
Dynamic: description-content-type
|
|
18
|
+
Dynamic: keywords
|
|
19
|
+
Dynamic: requires-dist
|
|
20
|
+
Dynamic: summary
|
|
21
|
+
|
|
22
|
+
API for the Swifty Receiver
|
|
23
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# rxfoundry.clients.swifty-receiver-api
|
|
2
|
+
API for the Swifty Receiver
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
6
|
+
|
|
7
|
+
- API version: 0.1.DEV-0
|
|
8
|
+
- Package version: 1.0.0
|
|
9
|
+
- Generator version: 7.13.0
|
|
10
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
11
|
+
|
|
12
|
+
## Requirements.
|
|
13
|
+
|
|
14
|
+
Python 3.9+
|
|
15
|
+
|
|
16
|
+
## Installation & Usage
|
|
17
|
+
### pip install
|
|
18
|
+
|
|
19
|
+
If the python package is hosted on a repository, you can install directly using:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
|
23
|
+
```
|
|
24
|
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
|
|
25
|
+
|
|
26
|
+
Then import the package:
|
|
27
|
+
```python
|
|
28
|
+
import rxfoundry.clients.swifty_receiver_api
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Setuptools
|
|
32
|
+
|
|
33
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
python setup.py install --user
|
|
37
|
+
```
|
|
38
|
+
(or `sudo python setup.py install` to install the package for all users)
|
|
39
|
+
|
|
40
|
+
Then import the package:
|
|
41
|
+
```python
|
|
42
|
+
import rxfoundry.clients.swifty_receiver_api
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Tests
|
|
46
|
+
|
|
47
|
+
Execute `pytest` to run the tests.
|
|
48
|
+
|
|
49
|
+
## Getting Started
|
|
50
|
+
|
|
51
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
|
|
55
|
+
import rxfoundry.clients.swifty_receiver_api
|
|
56
|
+
from rxfoundry.clients.swifty_receiver_api.rest import ApiException
|
|
57
|
+
from pprint import pprint
|
|
58
|
+
|
|
59
|
+
# Defining the host is optional and defaults to /api
|
|
60
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
61
|
+
configuration = rxfoundry.clients.swifty_receiver_api.Configuration(
|
|
62
|
+
host = "/api"
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# The client must configure the authentication and authorization parameters
|
|
66
|
+
# in accordance with the API server security policy.
|
|
67
|
+
# Examples for each auth method are provided below, use the example that
|
|
68
|
+
# satisfies your auth use case.
|
|
69
|
+
|
|
70
|
+
# Configure Bearer authorization (opaque): opaque_token
|
|
71
|
+
configuration = rxfoundry.clients.swifty_receiver_api.Configuration(
|
|
72
|
+
access_token = os.environ["BEARER_TOKEN"]
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
# Enter a context with an instance of the API client
|
|
77
|
+
with rxfoundry.clients.swifty_receiver_api.ApiClient(configuration) as api_client:
|
|
78
|
+
# Create an instance of the API class
|
|
79
|
+
api_instance = rxfoundry.clients.swifty_receiver_api.AsyncApi(api_client)
|
|
80
|
+
message = rxfoundry.clients.swifty_receiver_api.Message() # Message |
|
|
81
|
+
|
|
82
|
+
try:
|
|
83
|
+
# Post a new message asynchronously
|
|
84
|
+
api_response = api_instance.create_message(message)
|
|
85
|
+
print("The response of AsyncApi->create_message:\n")
|
|
86
|
+
pprint(api_response)
|
|
87
|
+
except ApiException as e:
|
|
88
|
+
print("Exception when calling AsyncApi->create_message: %s\n" % e)
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Documentation for API Endpoints
|
|
93
|
+
|
|
94
|
+
All URIs are relative to */api*
|
|
95
|
+
|
|
96
|
+
Class | Method | HTTP request | Description
|
|
97
|
+
------------ | ------------- | ------------- | -------------
|
|
98
|
+
*AsyncApi* | [**create_message**](docs/AsyncApi.md#create_message) | **POST** /receiver/1/async/message | Post a new message asynchronously
|
|
99
|
+
*VersionApi* | [**get_version**](docs/VersionApi.md#get_version) | **GET** /receiver/1/version | Get the api version
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## Documentation For Models
|
|
103
|
+
|
|
104
|
+
- [AsynchronousResponse](docs/AsynchronousResponse.md)
|
|
105
|
+
- [Message](docs/Message.md)
|
|
106
|
+
- [Version](docs/Version.md)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<a id="documentation-for-authorization"></a>
|
|
110
|
+
## Documentation For Authorization
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
Authentication schemes defined for the API:
|
|
114
|
+
<a id="opaque_token"></a>
|
|
115
|
+
### opaque_token
|
|
116
|
+
|
|
117
|
+
- **Type**: Bearer authentication (opaque)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## Author
|
|
121
|
+
|
|
122
|
+
paul.tindall@rxfoundry.com
|
|
123
|
+
|
|
124
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "rxfoundry.clients.swifty_receiver_api"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
description = "Swifty Receiver API"
|
|
5
|
+
authors = ["RxFoundry Team <paul.tindall@rxfoundry.com>"]
|
|
6
|
+
license = "NoLicense"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
|
|
9
|
+
keywords = ["OpenAPI", "OpenAPI-Generator", "Swifty Receiver API"]
|
|
10
|
+
include = ["rxfoundry.clients.swifty_receiver_api/py.typed"]
|
|
11
|
+
|
|
12
|
+
[tool.poetry.dependencies]
|
|
13
|
+
python = "^3.9"
|
|
14
|
+
|
|
15
|
+
urllib3 = ">= 2.1.0, < 3.0.0"
|
|
16
|
+
python-dateutil = ">= 2.8.2"
|
|
17
|
+
pydantic = ">= 2"
|
|
18
|
+
typing-extensions = ">= 4.7.1"
|
|
19
|
+
|
|
20
|
+
[tool.poetry.dev-dependencies]
|
|
21
|
+
pytest = ">= 7.2.1"
|
|
22
|
+
pytest-cov = ">= 2.8.1"
|
|
23
|
+
tox = ">= 3.9.0"
|
|
24
|
+
flake8 = ">= 4.0.0"
|
|
25
|
+
types-python-dateutil = ">= 2.8.19.14"
|
|
26
|
+
mypy = ">= 1.5"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
[build-system]
|
|
30
|
+
requires = ["setuptools"]
|
|
31
|
+
build-backend = "setuptools.build_meta"
|
|
32
|
+
|
|
33
|
+
[tool.pylint.'MESSAGES CONTROL']
|
|
34
|
+
extension-pkg-whitelist = "pydantic"
|
|
35
|
+
|
|
36
|
+
[tool.mypy]
|
|
37
|
+
files = [
|
|
38
|
+
"rxfoundry.clients.swifty_receiver_api",
|
|
39
|
+
#"test", # auto-generated tests
|
|
40
|
+
"tests", # hand-written tests
|
|
41
|
+
]
|
|
42
|
+
# TODO: enable "strict" once all these individual checks are passing
|
|
43
|
+
# strict = true
|
|
44
|
+
|
|
45
|
+
# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
|
|
46
|
+
warn_unused_configs = true
|
|
47
|
+
warn_redundant_casts = true
|
|
48
|
+
warn_unused_ignores = true
|
|
49
|
+
|
|
50
|
+
## Getting these passing should be easy
|
|
51
|
+
strict_equality = true
|
|
52
|
+
extra_checks = true
|
|
53
|
+
|
|
54
|
+
## Strongly recommend enabling this one as soon as you can
|
|
55
|
+
check_untyped_defs = true
|
|
56
|
+
|
|
57
|
+
## These shouldn't be too much additional work, but may be tricky to
|
|
58
|
+
## get passing if you use a lot of untyped libraries
|
|
59
|
+
disallow_subclassing_any = true
|
|
60
|
+
disallow_untyped_decorators = true
|
|
61
|
+
disallow_any_generics = true
|
|
62
|
+
|
|
63
|
+
### These next few are various gradations of forcing use of type annotations
|
|
64
|
+
#disallow_untyped_calls = true
|
|
65
|
+
#disallow_incomplete_defs = true
|
|
66
|
+
#disallow_untyped_defs = true
|
|
67
|
+
#
|
|
68
|
+
### This one isn't too hard to get passing, but return on investment is lower
|
|
69
|
+
#no_implicit_reexport = true
|
|
70
|
+
#
|
|
71
|
+
### This one can be tricky to get passing if you use a lot of untyped libraries
|
|
72
|
+
#warn_return_any = true
|
|
73
|
+
|
|
74
|
+
[[tool.mypy.overrides]]
|
|
75
|
+
module = [
|
|
76
|
+
"rxfoundry.clients.swifty_receiver_api.configuration",
|
|
77
|
+
]
|
|
78
|
+
warn_unused_ignores = true
|
|
79
|
+
strict_equality = true
|
|
80
|
+
extra_checks = true
|
|
81
|
+
check_untyped_defs = true
|
|
82
|
+
disallow_subclassing_any = true
|
|
83
|
+
disallow_untyped_decorators = true
|
|
84
|
+
disallow_any_generics = true
|
|
85
|
+
disallow_untyped_calls = true
|
|
86
|
+
disallow_incomplete_defs = true
|
|
87
|
+
disallow_untyped_defs = true
|
|
88
|
+
no_implicit_reexport = true
|
|
89
|
+
warn_return_any = true
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
Swifty Receiver API
|
|
7
|
+
|
|
8
|
+
API for the Swifty Receiver
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
11
|
+
Contact: paul.tindall@rxfoundry.com
|
|
12
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
13
|
+
|
|
14
|
+
Do not edit the class manually.
|
|
15
|
+
""" # noqa: E501
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
__version__ = "1.0.0"
|
|
19
|
+
|
|
20
|
+
# import apis into sdk package
|
|
21
|
+
from rxfoundry.clients.swifty_receiver_api.api.async_api import AsyncApi
|
|
22
|
+
from rxfoundry.clients.swifty_receiver_api.api.version_api import VersionApi
|
|
23
|
+
|
|
24
|
+
# import ApiClient
|
|
25
|
+
from rxfoundry.clients.swifty_receiver_api.api_response import ApiResponse
|
|
26
|
+
from rxfoundry.clients.swifty_receiver_api.api_client import ApiClient
|
|
27
|
+
from rxfoundry.clients.swifty_receiver_api.configuration import Configuration
|
|
28
|
+
from rxfoundry.clients.swifty_receiver_api.exceptions import OpenApiException
|
|
29
|
+
from rxfoundry.clients.swifty_receiver_api.exceptions import ApiTypeError
|
|
30
|
+
from rxfoundry.clients.swifty_receiver_api.exceptions import ApiValueError
|
|
31
|
+
from rxfoundry.clients.swifty_receiver_api.exceptions import ApiKeyError
|
|
32
|
+
from rxfoundry.clients.swifty_receiver_api.exceptions import ApiAttributeError
|
|
33
|
+
from rxfoundry.clients.swifty_receiver_api.exceptions import ApiException
|
|
34
|
+
|
|
35
|
+
# import models into sdk package
|
|
36
|
+
from rxfoundry.clients.swifty_receiver_api.models.asynchronous_response import AsynchronousResponse
|
|
37
|
+
from rxfoundry.clients.swifty_receiver_api.models.message import Message
|
|
38
|
+
from rxfoundry.clients.swifty_receiver_api.models.version import Version
|
rxfoundry_clients_swifty_receiver_api-1.0.0/rxfoundry/clients/swifty_receiver_api/api/async_api.py
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Swifty Receiver API
|
|
5
|
+
|
|
6
|
+
API for the Swifty Receiver
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from rxfoundry.clients.swifty_receiver_api.models.asynchronous_response import AsynchronousResponse
|
|
21
|
+
from rxfoundry.clients.swifty_receiver_api.models.message import Message
|
|
22
|
+
|
|
23
|
+
from rxfoundry.clients.swifty_receiver_api.api_client import ApiClient, RequestSerialized
|
|
24
|
+
from rxfoundry.clients.swifty_receiver_api.api_response import ApiResponse
|
|
25
|
+
from rxfoundry.clients.swifty_receiver_api.rest import RESTResponseType
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class AsyncApi:
|
|
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 create_message(
|
|
43
|
+
self,
|
|
44
|
+
message: Message,
|
|
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
|
+
) -> AsynchronousResponse:
|
|
58
|
+
"""Post a new message asynchronously
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
:param message: (required)
|
|
62
|
+
:type message: Message
|
|
63
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
64
|
+
number provided, it will be total request
|
|
65
|
+
timeout. It can also be a pair (tuple) of
|
|
66
|
+
(connection, read) timeouts.
|
|
67
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
68
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
69
|
+
request; this effectively ignores the
|
|
70
|
+
authentication in the spec for a single request.
|
|
71
|
+
:type _request_auth: dict, optional
|
|
72
|
+
:param _content_type: force content-type for the request.
|
|
73
|
+
:type _content_type: str, Optional
|
|
74
|
+
:param _headers: set to override the headers for a single
|
|
75
|
+
request; this effectively ignores the headers
|
|
76
|
+
in the spec for a single request.
|
|
77
|
+
:type _headers: dict, optional
|
|
78
|
+
:param _host_index: set to override the host_index for a single
|
|
79
|
+
request; this effectively ignores the host_index
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _host_index: int, optional
|
|
82
|
+
:return: Returns the result object.
|
|
83
|
+
""" # noqa: E501
|
|
84
|
+
|
|
85
|
+
_param = self._create_message_serialize(
|
|
86
|
+
message=message,
|
|
87
|
+
_request_auth=_request_auth,
|
|
88
|
+
_content_type=_content_type,
|
|
89
|
+
_headers=_headers,
|
|
90
|
+
_host_index=_host_index
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
94
|
+
'201': "AsynchronousResponse",
|
|
95
|
+
'400': None,
|
|
96
|
+
}
|
|
97
|
+
response_data = self.api_client.call_api(
|
|
98
|
+
*_param,
|
|
99
|
+
_request_timeout=_request_timeout
|
|
100
|
+
)
|
|
101
|
+
response_data.read()
|
|
102
|
+
return self.api_client.response_deserialize(
|
|
103
|
+
response_data=response_data,
|
|
104
|
+
response_types_map=_response_types_map,
|
|
105
|
+
).data
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
@validate_call
|
|
109
|
+
def create_message_with_http_info(
|
|
110
|
+
self,
|
|
111
|
+
message: Message,
|
|
112
|
+
_request_timeout: Union[
|
|
113
|
+
None,
|
|
114
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
115
|
+
Tuple[
|
|
116
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
118
|
+
]
|
|
119
|
+
] = None,
|
|
120
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
121
|
+
_content_type: Optional[StrictStr] = None,
|
|
122
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
123
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
124
|
+
) -> ApiResponse[AsynchronousResponse]:
|
|
125
|
+
"""Post a new message asynchronously
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
:param message: (required)
|
|
129
|
+
:type message: Message
|
|
130
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
131
|
+
number provided, it will be total request
|
|
132
|
+
timeout. It can also be a pair (tuple) of
|
|
133
|
+
(connection, read) timeouts.
|
|
134
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
135
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
136
|
+
request; this effectively ignores the
|
|
137
|
+
authentication in the spec for a single request.
|
|
138
|
+
:type _request_auth: dict, optional
|
|
139
|
+
:param _content_type: force content-type for the request.
|
|
140
|
+
:type _content_type: str, Optional
|
|
141
|
+
:param _headers: set to override the headers for a single
|
|
142
|
+
request; this effectively ignores the headers
|
|
143
|
+
in the spec for a single request.
|
|
144
|
+
:type _headers: dict, optional
|
|
145
|
+
:param _host_index: set to override the host_index for a single
|
|
146
|
+
request; this effectively ignores the host_index
|
|
147
|
+
in the spec for a single request.
|
|
148
|
+
:type _host_index: int, optional
|
|
149
|
+
:return: Returns the result object.
|
|
150
|
+
""" # noqa: E501
|
|
151
|
+
|
|
152
|
+
_param = self._create_message_serialize(
|
|
153
|
+
message=message,
|
|
154
|
+
_request_auth=_request_auth,
|
|
155
|
+
_content_type=_content_type,
|
|
156
|
+
_headers=_headers,
|
|
157
|
+
_host_index=_host_index
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
161
|
+
'201': "AsynchronousResponse",
|
|
162
|
+
'400': None,
|
|
163
|
+
}
|
|
164
|
+
response_data = self.api_client.call_api(
|
|
165
|
+
*_param,
|
|
166
|
+
_request_timeout=_request_timeout
|
|
167
|
+
)
|
|
168
|
+
response_data.read()
|
|
169
|
+
return self.api_client.response_deserialize(
|
|
170
|
+
response_data=response_data,
|
|
171
|
+
response_types_map=_response_types_map,
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
@validate_call
|
|
176
|
+
def create_message_without_preload_content(
|
|
177
|
+
self,
|
|
178
|
+
message: Message,
|
|
179
|
+
_request_timeout: Union[
|
|
180
|
+
None,
|
|
181
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
182
|
+
Tuple[
|
|
183
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
184
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
185
|
+
]
|
|
186
|
+
] = None,
|
|
187
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
188
|
+
_content_type: Optional[StrictStr] = None,
|
|
189
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
190
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
191
|
+
) -> RESTResponseType:
|
|
192
|
+
"""Post a new message asynchronously
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
:param message: (required)
|
|
196
|
+
:type message: Message
|
|
197
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
198
|
+
number provided, it will be total request
|
|
199
|
+
timeout. It can also be a pair (tuple) of
|
|
200
|
+
(connection, read) timeouts.
|
|
201
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
202
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
203
|
+
request; this effectively ignores the
|
|
204
|
+
authentication in the spec for a single request.
|
|
205
|
+
:type _request_auth: dict, optional
|
|
206
|
+
:param _content_type: force content-type for the request.
|
|
207
|
+
:type _content_type: str, Optional
|
|
208
|
+
:param _headers: set to override the headers for a single
|
|
209
|
+
request; this effectively ignores the headers
|
|
210
|
+
in the spec for a single request.
|
|
211
|
+
:type _headers: dict, optional
|
|
212
|
+
:param _host_index: set to override the host_index for a single
|
|
213
|
+
request; this effectively ignores the host_index
|
|
214
|
+
in the spec for a single request.
|
|
215
|
+
:type _host_index: int, optional
|
|
216
|
+
:return: Returns the result object.
|
|
217
|
+
""" # noqa: E501
|
|
218
|
+
|
|
219
|
+
_param = self._create_message_serialize(
|
|
220
|
+
message=message,
|
|
221
|
+
_request_auth=_request_auth,
|
|
222
|
+
_content_type=_content_type,
|
|
223
|
+
_headers=_headers,
|
|
224
|
+
_host_index=_host_index
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
228
|
+
'201': "AsynchronousResponse",
|
|
229
|
+
'400': None,
|
|
230
|
+
}
|
|
231
|
+
response_data = self.api_client.call_api(
|
|
232
|
+
*_param,
|
|
233
|
+
_request_timeout=_request_timeout
|
|
234
|
+
)
|
|
235
|
+
return response_data.response
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def _create_message_serialize(
|
|
239
|
+
self,
|
|
240
|
+
message,
|
|
241
|
+
_request_auth,
|
|
242
|
+
_content_type,
|
|
243
|
+
_headers,
|
|
244
|
+
_host_index,
|
|
245
|
+
) -> RequestSerialized:
|
|
246
|
+
|
|
247
|
+
_host = None
|
|
248
|
+
|
|
249
|
+
_collection_formats: Dict[str, str] = {
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
_path_params: Dict[str, str] = {}
|
|
253
|
+
_query_params: List[Tuple[str, str]] = []
|
|
254
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
255
|
+
_form_params: List[Tuple[str, str]] = []
|
|
256
|
+
_files: Dict[
|
|
257
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
258
|
+
] = {}
|
|
259
|
+
_body_params: Optional[bytes] = None
|
|
260
|
+
|
|
261
|
+
# process the path parameters
|
|
262
|
+
# process the query parameters
|
|
263
|
+
# process the header parameters
|
|
264
|
+
# process the form parameters
|
|
265
|
+
# process the body parameter
|
|
266
|
+
if message is not None:
|
|
267
|
+
_body_params = message
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
# set the HTTP header `Accept`
|
|
271
|
+
if 'Accept' not in _header_params:
|
|
272
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
273
|
+
[
|
|
274
|
+
'application/json'
|
|
275
|
+
]
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
# set the HTTP header `Content-Type`
|
|
279
|
+
if _content_type:
|
|
280
|
+
_header_params['Content-Type'] = _content_type
|
|
281
|
+
else:
|
|
282
|
+
_default_content_type = (
|
|
283
|
+
self.api_client.select_header_content_type(
|
|
284
|
+
[
|
|
285
|
+
'application/json'
|
|
286
|
+
]
|
|
287
|
+
)
|
|
288
|
+
)
|
|
289
|
+
if _default_content_type is not None:
|
|
290
|
+
_header_params['Content-Type'] = _default_content_type
|
|
291
|
+
|
|
292
|
+
# authentication setting
|
|
293
|
+
_auth_settings: List[str] = [
|
|
294
|
+
'opaque_token'
|
|
295
|
+
]
|
|
296
|
+
|
|
297
|
+
return self.api_client.param_serialize(
|
|
298
|
+
method='POST',
|
|
299
|
+
resource_path='/receiver/1/async/message',
|
|
300
|
+
path_params=_path_params,
|
|
301
|
+
query_params=_query_params,
|
|
302
|
+
header_params=_header_params,
|
|
303
|
+
body=_body_params,
|
|
304
|
+
post_params=_form_params,
|
|
305
|
+
files=_files,
|
|
306
|
+
auth_settings=_auth_settings,
|
|
307
|
+
collection_formats=_collection_formats,
|
|
308
|
+
_host=_host,
|
|
309
|
+
_request_auth=_request_auth
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
|