cheminee 0.0.15 → 0.1.6
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +25 -9
- data/cheminee.gemspec +1 -1
- data/docs/BulkRequest.md +18 -0
- data/docs/BulkRequestDoc.md +20 -0
- data/docs/CreateIndexError.md +18 -0
- data/docs/DefaultApi.md +392 -10
- data/docs/GetIndexesResponseError.md +18 -0
- data/docs/IndexMeta.md +20 -0
- data/docs/ListIndexResponseErr.md +18 -0
- data/docs/PostIndexBulkResponseError.md +18 -0
- data/docs/PostIndexBulkResponseOk.md +18 -0
- data/docs/PostIndexBulkResponseOkStatus.md +20 -0
- data/docs/Schema.md +20 -0
- data/docs/SubstructureSearchHit.md +24 -0
- data/lib/cheminee/api/default_api.rb +379 -9
- data/lib/cheminee/api_client.rb +3 -2
- data/lib/cheminee/api_error.rb +1 -1
- data/lib/cheminee/configuration.rb +6 -5
- data/lib/cheminee/models/bulk_request.rb +223 -0
- data/lib/cheminee/models/bulk_request_doc.rb +231 -0
- data/lib/cheminee/models/create_index_error.rb +221 -0
- data/lib/cheminee/models/get_indexes_response_error.rb +221 -0
- data/lib/cheminee/models/index_meta.rb +237 -0
- data/lib/cheminee/models/list_index_response_err.rb +221 -0
- data/lib/cheminee/models/post_index_bulk_response_error.rb +221 -0
- data/lib/cheminee/models/post_index_bulk_response_ok.rb +223 -0
- data/lib/cheminee/models/post_index_bulk_response_ok_status.rb +223 -0
- data/lib/cheminee/models/schema.rb +233 -0
- data/lib/cheminee/models/smile.rb +1 -1
- data/lib/cheminee/models/standardized_smile.rb +1 -1
- data/lib/cheminee/models/substructure_search_hit.rb +265 -0
- data/lib/cheminee/version.rb +2 -2
- data/lib/cheminee.rb +12 -1
- data/pkg/cheminee-0.1.6.gem +0 -0
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/bulk_request_doc_spec.rb +42 -0
- data/spec/models/bulk_request_spec.rb +36 -0
- data/spec/models/create_index_error_spec.rb +36 -0
- data/spec/models/get_indexes_response_error_spec.rb +36 -0
- data/spec/models/index_meta_spec.rb +42 -0
- data/spec/models/list_index_response_err_spec.rb +36 -0
- data/spec/models/post_index_bulk_response_error_spec.rb +36 -0
- data/spec/models/post_index_bulk_response_ok_spec.rb +36 -0
- data/spec/models/post_index_bulk_response_ok_status_spec.rb +42 -0
- data/spec/models/schema_spec.rb +42 -0
- data/spec/models/substructure_search_hit_spec.rb +54 -0
- data/spec/spec_helper.rb +1 -1
- metadata +47 -3
- data/pkg/cheminee-0.0.15.gem +0 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
# Cheminee::PostIndexBulkResponseError
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **error** | **String** | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'cheminee'
|
13
|
+
|
14
|
+
instance = Cheminee::PostIndexBulkResponseError.new(
|
15
|
+
error: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Cheminee::PostIndexBulkResponseOk
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **statuses** | [**Array<PostIndexBulkResponseOkStatus>**](PostIndexBulkResponseOkStatus.md) | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'cheminee'
|
13
|
+
|
14
|
+
instance = Cheminee::PostIndexBulkResponseOk.new(
|
15
|
+
statuses: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Cheminee::PostIndexBulkResponseOkStatus
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **opcode** | **Integer** | | [optional] |
|
8
|
+
| **error** | **String** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'cheminee'
|
14
|
+
|
15
|
+
instance = Cheminee::PostIndexBulkResponseOkStatus.new(
|
16
|
+
opcode: null,
|
17
|
+
error: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/Schema.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Cheminee::Schema
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | |
|
8
|
+
| **schema** | **Object** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'cheminee'
|
14
|
+
|
15
|
+
instance = Cheminee::Schema.new(
|
16
|
+
name: null,
|
17
|
+
schema: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Cheminee::SubstructureSearchHit
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **extra_data** | **Object** | | |
|
8
|
+
| **smiles** | **String** | | |
|
9
|
+
| **score** | **Float** | | |
|
10
|
+
| **query** | **String** | | |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'cheminee'
|
16
|
+
|
17
|
+
instance = Cheminee::SubstructureSearchHit.new(
|
18
|
+
extra_data: null,
|
19
|
+
smiles: null,
|
20
|
+
score: null,
|
21
|
+
query: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -19,27 +19,397 @@ module Cheminee
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# @param [Hash] opts the optional parameters
|
23
|
+
# @return [Array<IndexMeta>]
|
24
|
+
def v1_indexes_get(opts = {})
|
25
|
+
data, _status_code, _headers = v1_indexes_get_with_http_info(opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# @param [Hash] opts the optional parameters
|
30
|
+
# @return [Array<(Array<IndexMeta>, Integer, Hash)>] Array<IndexMeta> data, response status code and response headers
|
31
|
+
def v1_indexes_get_with_http_info(opts = {})
|
32
|
+
if @api_client.config.debugging
|
33
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_get ...'
|
34
|
+
end
|
35
|
+
# resource path
|
36
|
+
local_var_path = '/v1/indexes'
|
37
|
+
|
38
|
+
# query parameters
|
39
|
+
query_params = opts[:query_params] || {}
|
40
|
+
|
41
|
+
# header parameters
|
42
|
+
header_params = opts[:header_params] || {}
|
43
|
+
# HTTP header 'Accept' (if needed)
|
44
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
|
45
|
+
|
46
|
+
# form parameters
|
47
|
+
form_params = opts[:form_params] || {}
|
48
|
+
|
49
|
+
# http body (model)
|
50
|
+
post_body = opts[:debug_body]
|
51
|
+
|
52
|
+
# return_type
|
53
|
+
return_type = opts[:debug_return_type] || 'Array<IndexMeta>'
|
54
|
+
|
55
|
+
# auth_names
|
56
|
+
auth_names = opts[:debug_auth_names] || []
|
57
|
+
|
58
|
+
new_options = opts.merge(
|
59
|
+
:operation => :"DefaultApi.v1_indexes_get",
|
60
|
+
:header_params => header_params,
|
61
|
+
:query_params => query_params,
|
62
|
+
:form_params => form_params,
|
63
|
+
:body => post_body,
|
64
|
+
:auth_names => auth_names,
|
65
|
+
:return_type => return_type
|
66
|
+
)
|
67
|
+
|
68
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
69
|
+
if @api_client.config.debugging
|
70
|
+
@api_client.config.logger.debug "API called: DefaultApi#v1_indexes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
71
|
+
end
|
72
|
+
return data, status_code, headers
|
73
|
+
end
|
74
|
+
|
75
|
+
# @param index [String]
|
76
|
+
# @param bulk_request [BulkRequest]
|
77
|
+
# @param [Hash] opts the optional parameters
|
78
|
+
# @return [PostIndexBulkResponseOk]
|
79
|
+
def v1_indexes_index_bulk_index_post(index, bulk_request, opts = {})
|
80
|
+
data, _status_code, _headers = v1_indexes_index_bulk_index_post_with_http_info(index, bulk_request, opts)
|
81
|
+
data
|
82
|
+
end
|
83
|
+
|
84
|
+
# @param index [String]
|
85
|
+
# @param bulk_request [BulkRequest]
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @return [Array<(PostIndexBulkResponseOk, Integer, Hash)>] PostIndexBulkResponseOk data, response status code and response headers
|
88
|
+
def v1_indexes_index_bulk_index_post_with_http_info(index, bulk_request, opts = {})
|
89
|
+
if @api_client.config.debugging
|
90
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_bulk_index_post ...'
|
91
|
+
end
|
92
|
+
# verify the required parameter 'index' is set
|
93
|
+
if @api_client.config.client_side_validation && index.nil?
|
94
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_bulk_index_post"
|
95
|
+
end
|
96
|
+
# verify the required parameter 'bulk_request' is set
|
97
|
+
if @api_client.config.client_side_validation && bulk_request.nil?
|
98
|
+
fail ArgumentError, "Missing the required parameter 'bulk_request' when calling DefaultApi.v1_indexes_index_bulk_index_post"
|
99
|
+
end
|
100
|
+
# resource path
|
101
|
+
local_var_path = '/v1/indexes/{index}/bulk_index'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
|
102
|
+
|
103
|
+
# query parameters
|
104
|
+
query_params = opts[:query_params] || {}
|
105
|
+
|
106
|
+
# header parameters
|
107
|
+
header_params = opts[:header_params] || {}
|
108
|
+
# HTTP header 'Accept' (if needed)
|
109
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
|
110
|
+
# HTTP header 'Content-Type'
|
111
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
|
112
|
+
if !content_type.nil?
|
113
|
+
header_params['Content-Type'] = content_type
|
114
|
+
end
|
115
|
+
|
116
|
+
# form parameters
|
117
|
+
form_params = opts[:form_params] || {}
|
118
|
+
|
119
|
+
# http body (model)
|
120
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_request)
|
121
|
+
|
122
|
+
# return_type
|
123
|
+
return_type = opts[:debug_return_type] || 'PostIndexBulkResponseOk'
|
124
|
+
|
125
|
+
# auth_names
|
126
|
+
auth_names = opts[:debug_auth_names] || []
|
127
|
+
|
128
|
+
new_options = opts.merge(
|
129
|
+
:operation => :"DefaultApi.v1_indexes_index_bulk_index_post",
|
130
|
+
:header_params => header_params,
|
131
|
+
:query_params => query_params,
|
132
|
+
:form_params => form_params,
|
133
|
+
:body => post_body,
|
134
|
+
:auth_names => auth_names,
|
135
|
+
:return_type => return_type
|
136
|
+
)
|
137
|
+
|
138
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
139
|
+
if @api_client.config.debugging
|
140
|
+
@api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_bulk_index_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
141
|
+
end
|
142
|
+
return data, status_code, headers
|
143
|
+
end
|
144
|
+
|
145
|
+
# @param index [String]
|
146
|
+
# @param [Hash] opts the optional parameters
|
147
|
+
# @return [Array<IndexMeta>]
|
148
|
+
def v1_indexes_index_get(index, opts = {})
|
149
|
+
data, _status_code, _headers = v1_indexes_index_get_with_http_info(index, opts)
|
150
|
+
data
|
151
|
+
end
|
152
|
+
|
153
|
+
# @param index [String]
|
154
|
+
# @param [Hash] opts the optional parameters
|
155
|
+
# @return [Array<(Array<IndexMeta>, Integer, Hash)>] Array<IndexMeta> data, response status code and response headers
|
156
|
+
def v1_indexes_index_get_with_http_info(index, opts = {})
|
157
|
+
if @api_client.config.debugging
|
158
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_get ...'
|
159
|
+
end
|
160
|
+
# verify the required parameter 'index' is set
|
161
|
+
if @api_client.config.client_side_validation && index.nil?
|
162
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_get"
|
163
|
+
end
|
164
|
+
# resource path
|
165
|
+
local_var_path = '/v1/indexes/{index}'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
|
166
|
+
|
167
|
+
# query parameters
|
168
|
+
query_params = opts[:query_params] || {}
|
169
|
+
|
170
|
+
# header parameters
|
171
|
+
header_params = opts[:header_params] || {}
|
172
|
+
# HTTP header 'Accept' (if needed)
|
173
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
|
174
|
+
|
175
|
+
# form parameters
|
176
|
+
form_params = opts[:form_params] || {}
|
177
|
+
|
178
|
+
# http body (model)
|
179
|
+
post_body = opts[:debug_body]
|
180
|
+
|
181
|
+
# return_type
|
182
|
+
return_type = opts[:debug_return_type] || 'Array<IndexMeta>'
|
183
|
+
|
184
|
+
# auth_names
|
185
|
+
auth_names = opts[:debug_auth_names] || []
|
186
|
+
|
187
|
+
new_options = opts.merge(
|
188
|
+
:operation => :"DefaultApi.v1_indexes_index_get",
|
189
|
+
:header_params => header_params,
|
190
|
+
:query_params => query_params,
|
191
|
+
:form_params => form_params,
|
192
|
+
:body => post_body,
|
193
|
+
:auth_names => auth_names,
|
194
|
+
:return_type => return_type
|
195
|
+
)
|
196
|
+
|
197
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
198
|
+
if @api_client.config.debugging
|
199
|
+
@api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
200
|
+
end
|
201
|
+
return data, status_code, headers
|
202
|
+
end
|
203
|
+
|
204
|
+
# @param index [String]
|
205
|
+
# @param schema [String]
|
206
|
+
# @param [Hash] opts the optional parameters
|
207
|
+
# @option opts [String] :sort_by
|
208
|
+
# @return [IndexMeta]
|
209
|
+
def v1_indexes_index_post(index, schema, opts = {})
|
210
|
+
data, _status_code, _headers = v1_indexes_index_post_with_http_info(index, schema, opts)
|
211
|
+
data
|
212
|
+
end
|
213
|
+
|
214
|
+
# @param index [String]
|
215
|
+
# @param schema [String]
|
216
|
+
# @param [Hash] opts the optional parameters
|
217
|
+
# @option opts [String] :sort_by
|
218
|
+
# @return [Array<(IndexMeta, Integer, Hash)>] IndexMeta data, response status code and response headers
|
219
|
+
def v1_indexes_index_post_with_http_info(index, schema, opts = {})
|
220
|
+
if @api_client.config.debugging
|
221
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_post ...'
|
222
|
+
end
|
223
|
+
# verify the required parameter 'index' is set
|
224
|
+
if @api_client.config.client_side_validation && index.nil?
|
225
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_post"
|
226
|
+
end
|
227
|
+
# verify the required parameter 'schema' is set
|
228
|
+
if @api_client.config.client_side_validation && schema.nil?
|
229
|
+
fail ArgumentError, "Missing the required parameter 'schema' when calling DefaultApi.v1_indexes_index_post"
|
230
|
+
end
|
231
|
+
# resource path
|
232
|
+
local_var_path = '/v1/indexes/{index}'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
|
233
|
+
|
234
|
+
# query parameters
|
235
|
+
query_params = opts[:query_params] || {}
|
236
|
+
query_params[:'schema'] = schema
|
237
|
+
query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
238
|
+
|
239
|
+
# header parameters
|
240
|
+
header_params = opts[:header_params] || {}
|
241
|
+
# HTTP header 'Accept' (if needed)
|
242
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
|
243
|
+
|
244
|
+
# form parameters
|
245
|
+
form_params = opts[:form_params] || {}
|
246
|
+
|
247
|
+
# http body (model)
|
248
|
+
post_body = opts[:debug_body]
|
249
|
+
|
250
|
+
# return_type
|
251
|
+
return_type = opts[:debug_return_type] || 'IndexMeta'
|
252
|
+
|
253
|
+
# auth_names
|
254
|
+
auth_names = opts[:debug_auth_names] || []
|
255
|
+
|
256
|
+
new_options = opts.merge(
|
257
|
+
:operation => :"DefaultApi.v1_indexes_index_post",
|
258
|
+
:header_params => header_params,
|
259
|
+
:query_params => query_params,
|
260
|
+
:form_params => form_params,
|
261
|
+
:body => post_body,
|
262
|
+
:auth_names => auth_names,
|
263
|
+
:return_type => return_type
|
264
|
+
)
|
265
|
+
|
266
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
267
|
+
if @api_client.config.debugging
|
268
|
+
@api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
269
|
+
end
|
270
|
+
return data, status_code, headers
|
271
|
+
end
|
272
|
+
|
273
|
+
# @param index [String]
|
274
|
+
# @param q [String]
|
275
|
+
# @param [Hash] opts the optional parameters
|
276
|
+
# @return [Array<SubstructureSearchHit>]
|
277
|
+
def v1_indexes_index_search_substructure_get(index, q, opts = {})
|
278
|
+
data, _status_code, _headers = v1_indexes_index_search_substructure_get_with_http_info(index, q, opts)
|
279
|
+
data
|
280
|
+
end
|
281
|
+
|
282
|
+
# @param index [String]
|
283
|
+
# @param q [String]
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @return [Array<(Array<SubstructureSearchHit>, Integer, Hash)>] Array<SubstructureSearchHit> data, response status code and response headers
|
286
|
+
def v1_indexes_index_search_substructure_get_with_http_info(index, q, opts = {})
|
287
|
+
if @api_client.config.debugging
|
288
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_search_substructure_get ...'
|
289
|
+
end
|
290
|
+
# verify the required parameter 'index' is set
|
291
|
+
if @api_client.config.client_side_validation && index.nil?
|
292
|
+
fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_search_substructure_get"
|
293
|
+
end
|
294
|
+
# verify the required parameter 'q' is set
|
295
|
+
if @api_client.config.client_side_validation && q.nil?
|
296
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling DefaultApi.v1_indexes_index_search_substructure_get"
|
297
|
+
end
|
298
|
+
# resource path
|
299
|
+
local_var_path = '/v1/indexes/{index}/search/substructure'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
|
300
|
+
|
301
|
+
# query parameters
|
302
|
+
query_params = opts[:query_params] || {}
|
303
|
+
query_params[:'q'] = q
|
304
|
+
|
305
|
+
# header parameters
|
306
|
+
header_params = opts[:header_params] || {}
|
307
|
+
# HTTP header 'Accept' (if needed)
|
308
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
|
309
|
+
|
310
|
+
# form parameters
|
311
|
+
form_params = opts[:form_params] || {}
|
312
|
+
|
313
|
+
# http body (model)
|
314
|
+
post_body = opts[:debug_body]
|
315
|
+
|
316
|
+
# return_type
|
317
|
+
return_type = opts[:debug_return_type] || 'Array<SubstructureSearchHit>'
|
318
|
+
|
319
|
+
# auth_names
|
320
|
+
auth_names = opts[:debug_auth_names] || []
|
321
|
+
|
322
|
+
new_options = opts.merge(
|
323
|
+
:operation => :"DefaultApi.v1_indexes_index_search_substructure_get",
|
324
|
+
:header_params => header_params,
|
325
|
+
:query_params => query_params,
|
326
|
+
:form_params => form_params,
|
327
|
+
:body => post_body,
|
328
|
+
:auth_names => auth_names,
|
329
|
+
:return_type => return_type
|
330
|
+
)
|
331
|
+
|
332
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
333
|
+
if @api_client.config.debugging
|
334
|
+
@api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_search_substructure_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
335
|
+
end
|
336
|
+
return data, status_code, headers
|
337
|
+
end
|
338
|
+
|
339
|
+
# @param [Hash] opts the optional parameters
|
340
|
+
# @return [Array<Schema>]
|
341
|
+
def v1_schemas_get(opts = {})
|
342
|
+
data, _status_code, _headers = v1_schemas_get_with_http_info(opts)
|
343
|
+
data
|
344
|
+
end
|
345
|
+
|
346
|
+
# @param [Hash] opts the optional parameters
|
347
|
+
# @return [Array<(Array<Schema>, Integer, Hash)>] Array<Schema> data, response status code and response headers
|
348
|
+
def v1_schemas_get_with_http_info(opts = {})
|
349
|
+
if @api_client.config.debugging
|
350
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.v1_schemas_get ...'
|
351
|
+
end
|
352
|
+
# resource path
|
353
|
+
local_var_path = '/v1/schemas'
|
354
|
+
|
355
|
+
# query parameters
|
356
|
+
query_params = opts[:query_params] || {}
|
357
|
+
|
358
|
+
# header parameters
|
359
|
+
header_params = opts[:header_params] || {}
|
360
|
+
# HTTP header 'Accept' (if needed)
|
361
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
|
362
|
+
|
363
|
+
# form parameters
|
364
|
+
form_params = opts[:form_params] || {}
|
365
|
+
|
366
|
+
# http body (model)
|
367
|
+
post_body = opts[:debug_body]
|
368
|
+
|
369
|
+
# return_type
|
370
|
+
return_type = opts[:debug_return_type] || 'Array<Schema>'
|
371
|
+
|
372
|
+
# auth_names
|
373
|
+
auth_names = opts[:debug_auth_names] || []
|
374
|
+
|
375
|
+
new_options = opts.merge(
|
376
|
+
:operation => :"DefaultApi.v1_schemas_get",
|
377
|
+
:header_params => header_params,
|
378
|
+
:query_params => query_params,
|
379
|
+
:form_params => form_params,
|
380
|
+
:body => post_body,
|
381
|
+
:auth_names => auth_names,
|
382
|
+
:return_type => return_type
|
383
|
+
)
|
384
|
+
|
385
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
386
|
+
if @api_client.config.debugging
|
387
|
+
@api_client.config.logger.debug "API called: DefaultApi#v1_schemas_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
388
|
+
end
|
389
|
+
return data, status_code, headers
|
390
|
+
end
|
391
|
+
|
22
392
|
# @param smile [Array<Smile>]
|
23
393
|
# @param [Hash] opts the optional parameters
|
24
394
|
# @return [Array<StandardizedSmile>]
|
25
|
-
def
|
26
|
-
data, _status_code, _headers =
|
395
|
+
def v1_standardize_post(smile, opts = {})
|
396
|
+
data, _status_code, _headers = v1_standardize_post_with_http_info(smile, opts)
|
27
397
|
data
|
28
398
|
end
|
29
399
|
|
30
400
|
# @param smile [Array<Smile>]
|
31
401
|
# @param [Hash] opts the optional parameters
|
32
402
|
# @return [Array<(Array<StandardizedSmile>, Integer, Hash)>] Array<StandardizedSmile> data, response status code and response headers
|
33
|
-
def
|
403
|
+
def v1_standardize_post_with_http_info(smile, opts = {})
|
34
404
|
if @api_client.config.debugging
|
35
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
405
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.v1_standardize_post ...'
|
36
406
|
end
|
37
407
|
# verify the required parameter 'smile' is set
|
38
408
|
if @api_client.config.client_side_validation && smile.nil?
|
39
|
-
fail ArgumentError, "Missing the required parameter 'smile' when calling DefaultApi.
|
409
|
+
fail ArgumentError, "Missing the required parameter 'smile' when calling DefaultApi.v1_standardize_post"
|
40
410
|
end
|
41
411
|
# resource path
|
42
|
-
local_var_path = '/standardize'
|
412
|
+
local_var_path = '/v1/standardize'
|
43
413
|
|
44
414
|
# query parameters
|
45
415
|
query_params = opts[:query_params] || {}
|
@@ -67,7 +437,7 @@ module Cheminee
|
|
67
437
|
auth_names = opts[:debug_auth_names] || []
|
68
438
|
|
69
439
|
new_options = opts.merge(
|
70
|
-
:operation => :"DefaultApi.
|
440
|
+
:operation => :"DefaultApi.v1_standardize_post",
|
71
441
|
:header_params => header_params,
|
72
442
|
:query_params => query_params,
|
73
443
|
:form_params => form_params,
|
@@ -78,7 +448,7 @@ module Cheminee
|
|
78
448
|
|
79
449
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
450
|
if @api_client.config.debugging
|
81
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
451
|
+
@api_client.config.logger.debug "API called: DefaultApi#v1_standardize_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
452
|
end
|
83
453
|
return data, status_code, headers
|
84
454
|
end
|
data/lib/cheminee/api_client.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -17,6 +17,7 @@ require 'tempfile'
|
|
17
17
|
require 'time'
|
18
18
|
require 'typhoeus'
|
19
19
|
|
20
|
+
|
20
21
|
module Cheminee
|
21
22
|
class ApiClient
|
22
23
|
# The Configuration object holding settings to be used in the API client.
|
@@ -221,7 +222,7 @@ module Cheminee
|
|
221
222
|
return nil if body.nil? || body.empty?
|
222
223
|
|
223
224
|
# return response body directly for String return type
|
224
|
-
return body if return_type == 'String'
|
225
|
+
return body.to_s if return_type == 'String'
|
225
226
|
|
226
227
|
# ensuring a default content type
|
227
228
|
content_type = response.headers['Content-Type'] || 'application/json'
|
data/lib/cheminee/api_error.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.
|
9
|
+
OpenAPI Generator version: 7.1.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -151,7 +151,7 @@ module Cheminee
|
|
151
151
|
def initialize
|
152
152
|
@scheme = 'http'
|
153
153
|
@host = 'localhost:3000'
|
154
|
-
@base_path = '/api
|
154
|
+
@base_path = '/api'
|
155
155
|
@server_index = nil
|
156
156
|
@server_operation_index = {}
|
157
157
|
@server_variables = {}
|
@@ -222,8 +222,8 @@ module Cheminee
|
|
222
222
|
|
223
223
|
# Gets access_token using access_token_getter or uses the static access_token
|
224
224
|
def access_token_with_refresh
|
225
|
-
|
226
|
-
|
225
|
+
return access_token if access_token_getter.nil?
|
226
|
+
access_token_getter.call
|
227
227
|
end
|
228
228
|
|
229
229
|
# Gets Basic Auth token string
|
@@ -241,7 +241,7 @@ module Cheminee
|
|
241
241
|
def server_settings
|
242
242
|
[
|
243
243
|
{
|
244
|
-
url: "http://localhost:3000/api
|
244
|
+
url: "http://localhost:3000/api",
|
245
245
|
description: "No description provided",
|
246
246
|
}
|
247
247
|
]
|
@@ -286,5 +286,6 @@ module Cheminee
|
|
286
286
|
url
|
287
287
|
end
|
288
288
|
|
289
|
+
|
289
290
|
end
|
290
291
|
end
|