cheminee 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +72 -0
  4. data/README.md +112 -0
  5. data/Rakefile +10 -0
  6. data/cheminee.gemspec +39 -0
  7. data/docs/BulkRequest.md +18 -0
  8. data/docs/BulkRequestDoc.md +20 -0
  9. data/docs/CreateIndexError.md +18 -0
  10. data/docs/DefaultApi.md +529 -0
  11. data/docs/GetIndexesResponseError.md +18 -0
  12. data/docs/IndexMeta.md +20 -0
  13. data/docs/IndexSchema.md +20 -0
  14. data/docs/ListIndexResponseErr.md +18 -0
  15. data/docs/PostIndexBulkResponseError.md +18 -0
  16. data/docs/PostIndexBulkResponseOk.md +18 -0
  17. data/docs/PostIndexBulkResponseOkStatus.md +20 -0
  18. data/docs/QueryResponseError.md +18 -0
  19. data/docs/QuerySearchHit.md +22 -0
  20. data/docs/Schema.md +20 -0
  21. data/docs/Smile.md +18 -0
  22. data/docs/Smiles.md +18 -0
  23. data/docs/StandardizedSmile.md +20 -0
  24. data/docs/StandardizedSmiles.md +20 -0
  25. data/docs/StructureResponseError.md +18 -0
  26. data/docs/StructureSearchHit.md +26 -0
  27. data/docs/SubstructureSearchHit.md +24 -0
  28. data/git_push.sh +57 -0
  29. data/lib/cheminee/api/default_api.rb +550 -0
  30. data/lib/cheminee/api_client.rb +393 -0
  31. data/lib/cheminee/api_error.rb +58 -0
  32. data/lib/cheminee/configuration.rb +291 -0
  33. data/lib/cheminee/models/bulk_request.rb +223 -0
  34. data/lib/cheminee/models/bulk_request_doc.rb +232 -0
  35. data/lib/cheminee/models/create_index_error.rb +221 -0
  36. data/lib/cheminee/models/get_indexes_response_error.rb +221 -0
  37. data/lib/cheminee/models/index_meta.rb +237 -0
  38. data/lib/cheminee/models/index_schema.rb +233 -0
  39. data/lib/cheminee/models/list_index_response_err.rb +221 -0
  40. data/lib/cheminee/models/post_index_bulk_response_error.rb +221 -0
  41. data/lib/cheminee/models/post_index_bulk_response_ok.rb +223 -0
  42. data/lib/cheminee/models/post_index_bulk_response_ok_status.rb +223 -0
  43. data/lib/cheminee/models/query_response_error.rb +221 -0
  44. data/lib/cheminee/models/query_search_hit.rb +249 -0
  45. data/lib/cheminee/models/schema.rb +233 -0
  46. data/lib/cheminee/models/smile.rb +221 -0
  47. data/lib/cheminee/models/smiles.rb +221 -0
  48. data/lib/cheminee/models/standardized_smile.rb +223 -0
  49. data/lib/cheminee/models/standardized_smiles.rb +223 -0
  50. data/lib/cheminee/models/structure_response_error.rb +221 -0
  51. data/lib/cheminee/models/structure_search_hit.rb +281 -0
  52. data/lib/cheminee/models/substructure_search_hit.rb +265 -0
  53. data/lib/cheminee/version.rb +15 -0
  54. data/lib/cheminee.rb +57 -0
  55. data/openapi-generator-config.json +7 -0
  56. data/openapi.json +77 -0
  57. data/pkg/cheminee-0.0.14.gem +0 -0
  58. data/spec/api/default_api_spec.rb +45 -0
  59. data/spec/api_client_spec.rb +228 -0
  60. data/spec/configuration_spec.rb +42 -0
  61. data/spec/models/bulk_request_doc_spec.rb +42 -0
  62. data/spec/models/bulk_request_spec.rb +36 -0
  63. data/spec/models/create_index_error_spec.rb +36 -0
  64. data/spec/models/get_indexes_response_error_spec.rb +36 -0
  65. data/spec/models/index_meta_spec.rb +42 -0
  66. data/spec/models/index_schema_spec.rb +42 -0
  67. data/spec/models/list_index_response_err_spec.rb +36 -0
  68. data/spec/models/post_index_bulk_response_error_spec.rb +36 -0
  69. data/spec/models/post_index_bulk_response_ok_spec.rb +36 -0
  70. data/spec/models/post_index_bulk_response_ok_status_spec.rb +42 -0
  71. data/spec/models/query_response_error_spec.rb +36 -0
  72. data/spec/models/query_search_hit_spec.rb +48 -0
  73. data/spec/models/schema_spec.rb +42 -0
  74. data/spec/models/smile_spec.rb +34 -0
  75. data/spec/models/smiles_spec.rb +36 -0
  76. data/spec/models/standardized_smile_spec.rb +40 -0
  77. data/spec/models/standardized_smiles_spec.rb +42 -0
  78. data/spec/models/structure_response_error_spec.rb +36 -0
  79. data/spec/models/structure_search_hit_spec.rb +60 -0
  80. data/spec/models/substructure_search_hit_spec.rb +54 -0
  81. data/spec/spec_helper.rb +111 -0
  82. metadata +187 -0
@@ -0,0 +1,550 @@
1
+ =begin
2
+ #Cheminée
3
+
4
+ #Cheminée: The Chemical Structure Search Engine
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.3.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Cheminee
16
+ class DefaultApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List indexes
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [Array<IndexMeta>]
25
+ def v1_indexes_get(opts = {})
26
+ data, _status_code, _headers = v1_indexes_get_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # List indexes
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(Array<IndexMeta>, Integer, Hash)>] Array<IndexMeta> data, response status code and response headers
33
+ def v1_indexes_get_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_get ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/v1/indexes'
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
47
+
48
+ # form parameters
49
+ form_params = opts[:form_params] || {}
50
+
51
+ # http body (model)
52
+ post_body = opts[:debug_body]
53
+
54
+ # return_type
55
+ return_type = opts[:debug_return_type] || 'Array<IndexMeta>'
56
+
57
+ # auth_names
58
+ auth_names = opts[:debug_auth_names] || []
59
+
60
+ new_options = opts.merge(
61
+ :operation => :"DefaultApi.v1_indexes_get",
62
+ :header_params => header_params,
63
+ :query_params => query_params,
64
+ :form_params => form_params,
65
+ :body => post_body,
66
+ :auth_names => auth_names,
67
+ :return_type => return_type
68
+ )
69
+
70
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+
77
+ # Index a list of SMILES and associated, free-form JSON attributes which are indexed and searchable
78
+ # @param index [String]
79
+ # @param bulk_request [BulkRequest]
80
+ # @param [Hash] opts the optional parameters
81
+ # @return [PostIndexBulkResponseOk]
82
+ def v1_indexes_index_bulk_index_post(index, bulk_request, opts = {})
83
+ data, _status_code, _headers = v1_indexes_index_bulk_index_post_with_http_info(index, bulk_request, opts)
84
+ data
85
+ end
86
+
87
+ # Index a list of SMILES and associated, free-form JSON attributes which are indexed and searchable
88
+ # @param index [String]
89
+ # @param bulk_request [BulkRequest]
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [Array<(PostIndexBulkResponseOk, Integer, Hash)>] PostIndexBulkResponseOk data, response status code and response headers
92
+ def v1_indexes_index_bulk_index_post_with_http_info(index, bulk_request, opts = {})
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_bulk_index_post ...'
95
+ end
96
+ # verify the required parameter 'index' is set
97
+ if @api_client.config.client_side_validation && index.nil?
98
+ fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_bulk_index_post"
99
+ end
100
+ # verify the required parameter 'bulk_request' is set
101
+ if @api_client.config.client_side_validation && bulk_request.nil?
102
+ fail ArgumentError, "Missing the required parameter 'bulk_request' when calling DefaultApi.v1_indexes_index_bulk_index_post"
103
+ end
104
+ # resource path
105
+ local_var_path = '/v1/indexes/{index}/bulk_index'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
106
+
107
+ # query parameters
108
+ query_params = opts[:query_params] || {}
109
+
110
+ # header parameters
111
+ header_params = opts[:header_params] || {}
112
+ # HTTP header 'Accept' (if needed)
113
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
114
+ # HTTP header 'Content-Type'
115
+ content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
116
+ if !content_type.nil?
117
+ header_params['Content-Type'] = content_type
118
+ end
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(bulk_request)
125
+
126
+ # return_type
127
+ return_type = opts[:debug_return_type] || 'PostIndexBulkResponseOk'
128
+
129
+ # auth_names
130
+ auth_names = opts[:debug_auth_names] || []
131
+
132
+ new_options = opts.merge(
133
+ :operation => :"DefaultApi.v1_indexes_index_bulk_index_post",
134
+ :header_params => header_params,
135
+ :query_params => query_params,
136
+ :form_params => form_params,
137
+ :body => post_body,
138
+ :auth_names => auth_names,
139
+ :return_type => return_type
140
+ )
141
+
142
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_bulk_index_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ # Get extended information about an index
150
+ # @param index [String]
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [IndexSchema]
153
+ def v1_indexes_index_get(index, opts = {})
154
+ data, _status_code, _headers = v1_indexes_index_get_with_http_info(index, opts)
155
+ data
156
+ end
157
+
158
+ # Get extended information about an index
159
+ # @param index [String]
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [Array<(IndexSchema, Integer, Hash)>] IndexSchema data, response status code and response headers
162
+ def v1_indexes_index_get_with_http_info(index, opts = {})
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_get ...'
165
+ end
166
+ # verify the required parameter 'index' is set
167
+ if @api_client.config.client_side_validation && index.nil?
168
+ fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_get"
169
+ end
170
+ # resource path
171
+ local_var_path = '/v1/indexes/{index}'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
172
+
173
+ # query parameters
174
+ query_params = opts[:query_params] || {}
175
+
176
+ # header parameters
177
+ header_params = opts[:header_params] || {}
178
+ # HTTP header 'Accept' (if needed)
179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
180
+
181
+ # form parameters
182
+ form_params = opts[:form_params] || {}
183
+
184
+ # http body (model)
185
+ post_body = opts[:debug_body]
186
+
187
+ # return_type
188
+ return_type = opts[:debug_return_type] || 'IndexSchema'
189
+
190
+ # auth_names
191
+ auth_names = opts[:debug_auth_names] || []
192
+
193
+ new_options = opts.merge(
194
+ :operation => :"DefaultApi.v1_indexes_index_get",
195
+ :header_params => header_params,
196
+ :query_params => query_params,
197
+ :form_params => form_params,
198
+ :body => post_body,
199
+ :auth_names => auth_names,
200
+ :return_type => return_type
201
+ )
202
+
203
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
+ end
207
+ return data, status_code, headers
208
+ end
209
+
210
+ # Create an index
211
+ # @param index [String]
212
+ # @param schema [String]
213
+ # @param [Hash] opts the optional parameters
214
+ # @option opts [String] :sort_by
215
+ # @return [IndexMeta]
216
+ def v1_indexes_index_post(index, schema, opts = {})
217
+ data, _status_code, _headers = v1_indexes_index_post_with_http_info(index, schema, opts)
218
+ data
219
+ end
220
+
221
+ # Create an index
222
+ # @param index [String]
223
+ # @param schema [String]
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [String] :sort_by
226
+ # @return [Array<(IndexMeta, Integer, Hash)>] IndexMeta data, response status code and response headers
227
+ def v1_indexes_index_post_with_http_info(index, schema, opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_post ...'
230
+ end
231
+ # verify the required parameter 'index' is set
232
+ if @api_client.config.client_side_validation && index.nil?
233
+ fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_post"
234
+ end
235
+ # verify the required parameter 'schema' is set
236
+ if @api_client.config.client_side_validation && schema.nil?
237
+ fail ArgumentError, "Missing the required parameter 'schema' when calling DefaultApi.v1_indexes_index_post"
238
+ end
239
+ # resource path
240
+ local_var_path = '/v1/indexes/{index}'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
241
+
242
+ # query parameters
243
+ query_params = opts[:query_params] || {}
244
+ query_params[:'schema'] = schema
245
+ query_params[:'sort_by'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
246
+
247
+ # header parameters
248
+ header_params = opts[:header_params] || {}
249
+ # HTTP header 'Accept' (if needed)
250
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
251
+
252
+ # form parameters
253
+ form_params = opts[:form_params] || {}
254
+
255
+ # http body (model)
256
+ post_body = opts[:debug_body]
257
+
258
+ # return_type
259
+ return_type = opts[:debug_return_type] || 'IndexMeta'
260
+
261
+ # auth_names
262
+ auth_names = opts[:debug_auth_names] || []
263
+
264
+ new_options = opts.merge(
265
+ :operation => :"DefaultApi.v1_indexes_index_post",
266
+ :header_params => header_params,
267
+ :query_params => query_params,
268
+ :form_params => form_params,
269
+ :body => post_body,
270
+ :auth_names => auth_names,
271
+ :return_type => return_type
272
+ )
273
+
274
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
275
+ if @api_client.config.debugging
276
+ @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
277
+ end
278
+ return data, status_code, headers
279
+ end
280
+
281
+ # Perform basic query search against index
282
+ # @param index [String]
283
+ # @param query [String]
284
+ # @param [Hash] opts the optional parameters
285
+ # @option opts [Integer] :limit
286
+ # @return [Array<QuerySearchHit>]
287
+ def v1_indexes_index_search_basic_get(index, query, opts = {})
288
+ data, _status_code, _headers = v1_indexes_index_search_basic_get_with_http_info(index, query, opts)
289
+ data
290
+ end
291
+
292
+ # Perform basic query search against index
293
+ # @param index [String]
294
+ # @param query [String]
295
+ # @param [Hash] opts the optional parameters
296
+ # @option opts [Integer] :limit
297
+ # @return [Array<(Array<QuerySearchHit>, Integer, Hash)>] Array<QuerySearchHit> data, response status code and response headers
298
+ def v1_indexes_index_search_basic_get_with_http_info(index, query, opts = {})
299
+ if @api_client.config.debugging
300
+ @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_search_basic_get ...'
301
+ end
302
+ # verify the required parameter 'index' is set
303
+ if @api_client.config.client_side_validation && index.nil?
304
+ fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_search_basic_get"
305
+ end
306
+ # verify the required parameter 'query' is set
307
+ if @api_client.config.client_side_validation && query.nil?
308
+ fail ArgumentError, "Missing the required parameter 'query' when calling DefaultApi.v1_indexes_index_search_basic_get"
309
+ end
310
+ # resource path
311
+ local_var_path = '/v1/indexes/{index}/search/basic'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
312
+
313
+ # query parameters
314
+ query_params = opts[:query_params] || {}
315
+ query_params[:'query'] = query
316
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
317
+
318
+ # header parameters
319
+ header_params = opts[:header_params] || {}
320
+ # HTTP header 'Accept' (if needed)
321
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
322
+
323
+ # form parameters
324
+ form_params = opts[:form_params] || {}
325
+
326
+ # http body (model)
327
+ post_body = opts[:debug_body]
328
+
329
+ # return_type
330
+ return_type = opts[:debug_return_type] || 'Array<QuerySearchHit>'
331
+
332
+ # auth_names
333
+ auth_names = opts[:debug_auth_names] || []
334
+
335
+ new_options = opts.merge(
336
+ :operation => :"DefaultApi.v1_indexes_index_search_basic_get",
337
+ :header_params => header_params,
338
+ :query_params => query_params,
339
+ :form_params => form_params,
340
+ :body => post_body,
341
+ :auth_names => auth_names,
342
+ :return_type => return_type
343
+ )
344
+
345
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
346
+ if @api_client.config.debugging
347
+ @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_search_basic_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
348
+ end
349
+ return data, status_code, headers
350
+ end
351
+
352
+ # Perform substructure search against index
353
+ # @param index [String]
354
+ # @param smiles [String]
355
+ # @param [Hash] opts the optional parameters
356
+ # @option opts [Integer] :result_limit
357
+ # @option opts [Integer] :tautomer_limit
358
+ # @option opts [String] :extra_query
359
+ # @return [Array<StructureSearchHit>]
360
+ def v1_indexes_index_search_substructure_get(index, smiles, opts = {})
361
+ data, _status_code, _headers = v1_indexes_index_search_substructure_get_with_http_info(index, smiles, opts)
362
+ data
363
+ end
364
+
365
+ # Perform substructure search against index
366
+ # @param index [String]
367
+ # @param smiles [String]
368
+ # @param [Hash] opts the optional parameters
369
+ # @option opts [Integer] :result_limit
370
+ # @option opts [Integer] :tautomer_limit
371
+ # @option opts [String] :extra_query
372
+ # @return [Array<(Array<StructureSearchHit>, Integer, Hash)>] Array<StructureSearchHit> data, response status code and response headers
373
+ def v1_indexes_index_search_substructure_get_with_http_info(index, smiles, opts = {})
374
+ if @api_client.config.debugging
375
+ @api_client.config.logger.debug 'Calling API: DefaultApi.v1_indexes_index_search_substructure_get ...'
376
+ end
377
+ # verify the required parameter 'index' is set
378
+ if @api_client.config.client_side_validation && index.nil?
379
+ fail ArgumentError, "Missing the required parameter 'index' when calling DefaultApi.v1_indexes_index_search_substructure_get"
380
+ end
381
+ # verify the required parameter 'smiles' is set
382
+ if @api_client.config.client_side_validation && smiles.nil?
383
+ fail ArgumentError, "Missing the required parameter 'smiles' when calling DefaultApi.v1_indexes_index_search_substructure_get"
384
+ end
385
+ # resource path
386
+ local_var_path = '/v1/indexes/{index}/search/substructure'.sub('{' + 'index' + '}', CGI.escape(index.to_s))
387
+
388
+ # query parameters
389
+ query_params = opts[:query_params] || {}
390
+ query_params[:'smiles'] = smiles
391
+ query_params[:'result_limit'] = opts[:'result_limit'] if !opts[:'result_limit'].nil?
392
+ query_params[:'tautomer_limit'] = opts[:'tautomer_limit'] if !opts[:'tautomer_limit'].nil?
393
+ query_params[:'extra_query'] = opts[:'extra_query'] if !opts[:'extra_query'].nil?
394
+
395
+ # header parameters
396
+ header_params = opts[:header_params] || {}
397
+ # HTTP header 'Accept' (if needed)
398
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
399
+
400
+ # form parameters
401
+ form_params = opts[:form_params] || {}
402
+
403
+ # http body (model)
404
+ post_body = opts[:debug_body]
405
+
406
+ # return_type
407
+ return_type = opts[:debug_return_type] || 'Array<StructureSearchHit>'
408
+
409
+ # auth_names
410
+ auth_names = opts[:debug_auth_names] || []
411
+
412
+ new_options = opts.merge(
413
+ :operation => :"DefaultApi.v1_indexes_index_search_substructure_get",
414
+ :header_params => header_params,
415
+ :query_params => query_params,
416
+ :form_params => form_params,
417
+ :body => post_body,
418
+ :auth_names => auth_names,
419
+ :return_type => return_type
420
+ )
421
+
422
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
423
+ if @api_client.config.debugging
424
+ @api_client.config.logger.debug "API called: DefaultApi#v1_indexes_index_search_substructure_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
425
+ end
426
+ return data, status_code, headers
427
+ end
428
+
429
+ # List schemas available for creating indexes
430
+ # @param [Hash] opts the optional parameters
431
+ # @return [Array<Schema>]
432
+ def v1_schemas_get(opts = {})
433
+ data, _status_code, _headers = v1_schemas_get_with_http_info(opts)
434
+ data
435
+ end
436
+
437
+ # List schemas available for creating indexes
438
+ # @param [Hash] opts the optional parameters
439
+ # @return [Array<(Array<Schema>, Integer, Hash)>] Array<Schema> data, response status code and response headers
440
+ def v1_schemas_get_with_http_info(opts = {})
441
+ if @api_client.config.debugging
442
+ @api_client.config.logger.debug 'Calling API: DefaultApi.v1_schemas_get ...'
443
+ end
444
+ # resource path
445
+ local_var_path = '/v1/schemas'
446
+
447
+ # query parameters
448
+ query_params = opts[:query_params] || {}
449
+
450
+ # header parameters
451
+ header_params = opts[:header_params] || {}
452
+ # HTTP header 'Accept' (if needed)
453
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
454
+
455
+ # form parameters
456
+ form_params = opts[:form_params] || {}
457
+
458
+ # http body (model)
459
+ post_body = opts[:debug_body]
460
+
461
+ # return_type
462
+ return_type = opts[:debug_return_type] || 'Array<Schema>'
463
+
464
+ # auth_names
465
+ auth_names = opts[:debug_auth_names] || []
466
+
467
+ new_options = opts.merge(
468
+ :operation => :"DefaultApi.v1_schemas_get",
469
+ :header_params => header_params,
470
+ :query_params => query_params,
471
+ :form_params => form_params,
472
+ :body => post_body,
473
+ :auth_names => auth_names,
474
+ :return_type => return_type
475
+ )
476
+
477
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
478
+ if @api_client.config.debugging
479
+ @api_client.config.logger.debug "API called: DefaultApi#v1_schemas_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
480
+ end
481
+ return data, status_code, headers
482
+ end
483
+
484
+ # Pass a list of SMILES through fragment_parent, uncharger, and canonicalization routines
485
+ # @param smiles [Array<Smiles>]
486
+ # @param [Hash] opts the optional parameters
487
+ # @return [Array<StandardizedSmiles>]
488
+ def v1_standardize_post(smiles, opts = {})
489
+ data, _status_code, _headers = v1_standardize_post_with_http_info(smiles, opts)
490
+ data
491
+ end
492
+
493
+ # Pass a list of SMILES through fragment_parent, uncharger, and canonicalization routines
494
+ # @param smiles [Array<Smiles>]
495
+ # @param [Hash] opts the optional parameters
496
+ # @return [Array<(Array<StandardizedSmiles>, Integer, Hash)>] Array<StandardizedSmiles> data, response status code and response headers
497
+ def v1_standardize_post_with_http_info(smiles, opts = {})
498
+ if @api_client.config.debugging
499
+ @api_client.config.logger.debug 'Calling API: DefaultApi.v1_standardize_post ...'
500
+ end
501
+ # verify the required parameter 'smiles' is set
502
+ if @api_client.config.client_side_validation && smiles.nil?
503
+ fail ArgumentError, "Missing the required parameter 'smiles' when calling DefaultApi.v1_standardize_post"
504
+ end
505
+ # resource path
506
+ local_var_path = '/v1/standardize'
507
+
508
+ # query parameters
509
+ query_params = opts[:query_params] || {}
510
+
511
+ # header parameters
512
+ header_params = opts[:header_params] || {}
513
+ # HTTP header 'Accept' (if needed)
514
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
515
+ # HTTP header 'Content-Type'
516
+ content_type = @api_client.select_header_content_type(['application/json; charset=utf-8'])
517
+ if !content_type.nil?
518
+ header_params['Content-Type'] = content_type
519
+ end
520
+
521
+ # form parameters
522
+ form_params = opts[:form_params] || {}
523
+
524
+ # http body (model)
525
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(smiles)
526
+
527
+ # return_type
528
+ return_type = opts[:debug_return_type] || 'Array<StandardizedSmiles>'
529
+
530
+ # auth_names
531
+ auth_names = opts[:debug_auth_names] || []
532
+
533
+ new_options = opts.merge(
534
+ :operation => :"DefaultApi.v1_standardize_post",
535
+ :header_params => header_params,
536
+ :query_params => query_params,
537
+ :form_params => form_params,
538
+ :body => post_body,
539
+ :auth_names => auth_names,
540
+ :return_type => return_type
541
+ )
542
+
543
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
544
+ if @api_client.config.debugging
545
+ @api_client.config.logger.debug "API called: DefaultApi#v1_standardize_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
546
+ end
547
+ return data, status_code, headers
548
+ end
549
+ end
550
+ end