eis-commenting 1.2.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.
- eis_commenting-1.2.0/PKG-INFO +16 -0
- eis_commenting-1.2.0/README.md +165 -0
- eis_commenting-1.2.0/eis/__init__.py +0 -0
- eis_commenting-1.2.0/eis/commenting/__init__.py +28 -0
- eis_commenting-1.2.0/eis/commenting/api/__init__.py +3 -0
- eis_commenting-1.2.0/eis/commenting/api/comments_api.py +784 -0
- eis_commenting-1.2.0/eis/commenting/api/health_api.py +160 -0
- eis_commenting-1.2.0/eis/commenting/api_client.py +998 -0
- eis_commenting-1.2.0/eis/commenting/apis/__init__.py +18 -0
- eis_commenting-1.2.0/eis/commenting/configuration.py +456 -0
- eis_commenting-1.2.0/eis/commenting/exceptions.py +159 -0
- eis_commenting-1.2.0/eis/commenting/model/__init__.py +5 -0
- eis_commenting-1.2.0/eis/commenting/model/comment_class.py +358 -0
- eis_commenting-1.2.0/eis/commenting/model/create_comment_request_dto.py +294 -0
- eis_commenting-1.2.0/eis/commenting/model/create_comment_response_class.py +276 -0
- eis_commenting-1.2.0/eis/commenting/model/get_comment_response_class.py +276 -0
- eis_commenting-1.2.0/eis/commenting/model/inline_response200.py +276 -0
- eis_commenting-1.2.0/eis/commenting/model/inline_response503.py +276 -0
- eis_commenting-1.2.0/eis/commenting/model/list_comment_response_class.py +294 -0
- eis_commenting-1.2.0/eis/commenting/model/update_comment_request_dto.py +272 -0
- eis_commenting-1.2.0/eis/commenting/model/update_comment_response_class.py +276 -0
- eis_commenting-1.2.0/eis/commenting/model_utils.py +2063 -0
- eis_commenting-1.2.0/eis/commenting/models/__init__.py +20 -0
- eis_commenting-1.2.0/eis/commenting/rest.py +475 -0
- eis_commenting-1.2.0/eis_commenting.egg-info/PKG-INFO +16 -0
- eis_commenting-1.2.0/eis_commenting.egg-info/SOURCES.txt +41 -0
- eis_commenting-1.2.0/eis_commenting.egg-info/dependency_links.txt +1 -0
- eis_commenting-1.2.0/eis_commenting.egg-info/requires.txt +2 -0
- eis_commenting-1.2.0/eis_commenting.egg-info/top_level.txt +1 -0
- eis_commenting-1.2.0/setup.cfg +11 -0
- eis_commenting-1.2.0/setup.py +43 -0
- eis_commenting-1.2.0/test/test_comment_class.py +36 -0
- eis_commenting-1.2.0/test/test_comments_api.py +64 -0
- eis_commenting-1.2.0/test/test_create_comment_request_dto.py +36 -0
- eis_commenting-1.2.0/test/test_create_comment_response_class.py +38 -0
- eis_commenting-1.2.0/test/test_get_comment_response_class.py +38 -0
- eis_commenting-1.2.0/test/test_health_api.py +36 -0
- eis_commenting-1.2.0/test/test_inline_response200.py +36 -0
- eis_commenting-1.2.0/test/test_inline_response503.py +36 -0
- eis_commenting-1.2.0/test/test_list_comment_response_class.py +38 -0
- eis_commenting-1.2.0/test/test_update_comment_request_dto.py +36 -0
- eis_commenting-1.2.0/test/test_update_comment_response_class.py +38 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: eis_commenting
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: EMIL Commentingservice
|
|
5
|
+
Home-page: UNKNOWN
|
|
6
|
+
Author: Contact us
|
|
7
|
+
Author-email: kontakt@emil.de
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Keywords: OpenAPI,OpenAPI-Generator,EMIL Commentingservice
|
|
10
|
+
Platform: UNKNOWN
|
|
11
|
+
Requires-Python: >=3.6
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
The EMIL Commentingservice API description # noqa: E501
|
|
15
|
+
|
|
16
|
+
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# eis_commenting
|
|
2
|
+
The EMIL Commentingservice API description
|
|
3
|
+
|
|
4
|
+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
5
|
+
|
|
6
|
+
- API version: 1.0
|
|
7
|
+
- Package version: 1.2.0
|
|
8
|
+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
9
|
+
For more information, please visit [https://www.emil.de](https://www.emil.de)
|
|
10
|
+
|
|
11
|
+
## Requirements.
|
|
12
|
+
|
|
13
|
+
Python >=3.6
|
|
14
|
+
|
|
15
|
+
## Installation & Usage
|
|
16
|
+
### pip install
|
|
17
|
+
|
|
18
|
+
If the python package is hosted on a repository, you can install directly using:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
pip install eis.commenting
|
|
22
|
+
```
|
|
23
|
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/emilDev/eis-commenting-sdk.git`)
|
|
24
|
+
|
|
25
|
+
Then import the package:
|
|
26
|
+
```python
|
|
27
|
+
import eis.commenting
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Setuptools
|
|
31
|
+
|
|
32
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
python setup.py install --user
|
|
36
|
+
```
|
|
37
|
+
(or `sudo python setup.py install` to install the package for all users)
|
|
38
|
+
|
|
39
|
+
Then import the package:
|
|
40
|
+
```python
|
|
41
|
+
import eis.commenting
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Getting Started
|
|
45
|
+
|
|
46
|
+
The environment variables must be set in order to properly use this SDK.
|
|
47
|
+
|
|
48
|
+
```shell
|
|
49
|
+
export EMIL_USERNAME=XXXXXXX
|
|
50
|
+
export EMIL_PASSWORD=XXXXXXX
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
import time
|
|
57
|
+
import eis.commenting
|
|
58
|
+
from pprint import pprint
|
|
59
|
+
from eis.commenting.api import comments_api
|
|
60
|
+
from eis.commenting.model.create_comment_request_dto import CreateCommentRequestDto
|
|
61
|
+
from eis.commenting.model.create_comment_response_class import CreateCommentResponseClass
|
|
62
|
+
from eis.commenting.model.get_comment_response_class import GetCommentResponseClass
|
|
63
|
+
from eis.commenting.model.list_comment_response_class import ListCommentResponseClass
|
|
64
|
+
from eis.commenting.model.update_comment_request_dto import UpdateCommentRequestDto
|
|
65
|
+
from eis.commenting.model.update_comment_response_class import UpdateCommentResponseClass
|
|
66
|
+
# Defining the host is optional and defaults to https://apiv2.emil.de
|
|
67
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
68
|
+
configuration = eis.commenting.Configuration(
|
|
69
|
+
host = "https://apiv2.emil.de"
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# The client must configure the authentication and authorization parameters
|
|
73
|
+
# in accordance with the API server security policy.
|
|
74
|
+
# Examples for each auth method are provided below, use the example that
|
|
75
|
+
# satisfies your auth use case.
|
|
76
|
+
|
|
77
|
+
# Bearer is automatically handled with exported environment variables. However, you
|
|
78
|
+
# can manuallay configure Bearer authorization (JWT): bearer
|
|
79
|
+
configuration = eis.commenting.Configuration(
|
|
80
|
+
access_token = 'YOUR_BEARER_TOKEN'
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
# After manual token becomes invalid, the SDK will default to re-login automatically
|
|
84
|
+
# with environment variable credentials.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# Enter a context with an instance of the API client
|
|
88
|
+
with eis.commenting.ApiClient(configuration) as api_client:
|
|
89
|
+
# Create an instance of the API class
|
|
90
|
+
api_instance = comments_api.CommentsApi(api_client)
|
|
91
|
+
create_comment_request_dto = CreateCommentRequestDto(
|
|
92
|
+
entity_type="Policy",
|
|
93
|
+
entity_code="pol_Qei9aALKz-pYPZ2V",
|
|
94
|
+
content="This policy needs review before approval.",
|
|
95
|
+
parent_comment_code="cmnt_b_FFzNWna2",
|
|
96
|
+
) # CreateCommentRequestDto |
|
|
97
|
+
authorization = "Authorization_example" # str | Bearer Token: provided by the login endpoint under the name accessToken. (optional)
|
|
98
|
+
|
|
99
|
+
try:
|
|
100
|
+
# Create the comment
|
|
101
|
+
api_response = api_instance.create_comment(create_comment_request_dto, authorization=authorization)
|
|
102
|
+
pprint(api_response)
|
|
103
|
+
except eis.commenting.ApiException as e:
|
|
104
|
+
print("Exception when calling CommentsApi->create_comment: %s\n" % e)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Documentation for API Endpoints
|
|
108
|
+
|
|
109
|
+
All URIs are relative to *https://apiv2.emil.de*
|
|
110
|
+
|
|
111
|
+
Class | Method | HTTP request | Description
|
|
112
|
+
------------ | ------------- | ------------- | -------------
|
|
113
|
+
*CommentsApi* | [**create_comment**](docs/CommentsApi.md#create_comment) | **POST** /commentingservice/v1/comments | Create the comment
|
|
114
|
+
*CommentsApi* | [**delete_comment**](docs/CommentsApi.md#delete_comment) | **DELETE** /commentingservice/v1/comments/{code} | Delete the comment
|
|
115
|
+
*CommentsApi* | [**get_comment**](docs/CommentsApi.md#get_comment) | **GET** /commentingservice/v1/comments/{code} | Retrieve the comment
|
|
116
|
+
*CommentsApi* | [**list_comments**](docs/CommentsApi.md#list_comments) | **GET** /commentingservice/v1/comments | List comments
|
|
117
|
+
*CommentsApi* | [**update_comment**](docs/CommentsApi.md#update_comment) | **PATCH** /commentingservice/v1/comments/{code} | Update the comment
|
|
118
|
+
*HealthApi* | [**check**](docs/HealthApi.md#check) | **GET** /commentingservice/health | Health Check
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## Documentation For Models
|
|
122
|
+
|
|
123
|
+
- [CommentClass](docs/CommentClass.md)
|
|
124
|
+
- [CreateCommentRequestDto](docs/CreateCommentRequestDto.md)
|
|
125
|
+
- [CreateCommentResponseClass](docs/CreateCommentResponseClass.md)
|
|
126
|
+
- [GetCommentResponseClass](docs/GetCommentResponseClass.md)
|
|
127
|
+
- [InlineResponse200](docs/InlineResponse200.md)
|
|
128
|
+
- [InlineResponse503](docs/InlineResponse503.md)
|
|
129
|
+
- [ListCommentResponseClass](docs/ListCommentResponseClass.md)
|
|
130
|
+
- [UpdateCommentRequestDto](docs/UpdateCommentRequestDto.md)
|
|
131
|
+
- [UpdateCommentResponseClass](docs/UpdateCommentResponseClass.md)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## Documentation For Authorization
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
## bearer
|
|
138
|
+
|
|
139
|
+
- **Type**: Bearer authentication (JWT)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## Author
|
|
143
|
+
|
|
144
|
+
kontakt@emil.de
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
## Notes for Large OpenAPI documents
|
|
148
|
+
If the OpenAPI document is large, imports in eis.commenting.apis and eis.commenting.models may fail with a
|
|
149
|
+
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
|
|
150
|
+
|
|
151
|
+
Solution 1:
|
|
152
|
+
Use specific imports for apis and models like:
|
|
153
|
+
- `from eis.commenting.api.default_api import DefaultApi`
|
|
154
|
+
- `from eis.commenting.model.pet import Pet`
|
|
155
|
+
|
|
156
|
+
Solution 2:
|
|
157
|
+
Before importing the package, adjust the maximum recursion limit as shown below:
|
|
158
|
+
```
|
|
159
|
+
import sys
|
|
160
|
+
sys.setrecursionlimit(1500)
|
|
161
|
+
import eis.commenting
|
|
162
|
+
from eis.commenting.apis import *
|
|
163
|
+
from eis.commenting.models import *
|
|
164
|
+
```
|
|
165
|
+
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# flake8: noqa
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
EMIL Commentingservice
|
|
5
|
+
|
|
6
|
+
The EMIL Commentingservice API description # noqa: E501
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: kontakt@emil.de
|
|
10
|
+
Generated by: https://openapi-generator.tech
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
__version__ = "1.2.0"
|
|
15
|
+
|
|
16
|
+
# import ApiClient
|
|
17
|
+
from eis.commenting.api_client import ApiClient
|
|
18
|
+
|
|
19
|
+
# import Configuration
|
|
20
|
+
from eis.commenting.configuration import Configuration
|
|
21
|
+
|
|
22
|
+
# import exceptions
|
|
23
|
+
from eis.commenting.exceptions import OpenApiException
|
|
24
|
+
from eis.commenting.exceptions import ApiAttributeError
|
|
25
|
+
from eis.commenting.exceptions import ApiTypeError
|
|
26
|
+
from eis.commenting.exceptions import ApiValueError
|
|
27
|
+
from eis.commenting.exceptions import ApiKeyError
|
|
28
|
+
from eis.commenting.exceptions import ApiException
|