cloudmersive-image-recognition-api-client 1.3.6 → 1.3.7
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cfd12fff010b4cc8d51955603aab29cf9fcbb203fe38bc1a6181f4269dc8342
|
4
|
+
data.tar.gz: 137246e5d6cdfbe43262a6fc3aedf94c38dcf2531ff7fd3546da31aaa0632860
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a025f66ba32766c4b34a38c141915ccaabe9639190a07413350c30ab4545759efd07c2d8f2699bf1bab2d5086971d34306b48d0926b460aa11cc30335ba7111c
|
7
|
+
data.tar.gz: a419e831cdb736bb55cb520c735da1e82595b514347130459613975f7e13a65aa5d18385981d41e8c3c8d1a802cabce8ebeba3ec6f5793bab2d26efcd641726d
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Image Recognition and Processing APIs let you use Machine Learning to recognize
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 1.3.
|
10
|
+
- Package version: 1.3.7
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-image-recognition-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-image-recognition-api-client-1.3.
|
26
|
+
gem install ./cloudmersive-image-recognition-api-client-1.3.7.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-1.3.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-image-recognition-api-client-1.3.7.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-image-recognition-api-client', '~> 1.3.
|
34
|
+
gem 'cloudmersive-image-recognition-api-client', '~> 1.3.7'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
@@ -89,8 +89,8 @@ Class | Method | HTTP request | Description
|
|
89
89
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_auto_orient**](docs/EditApi.md#edit_auto_orient) | **POST** /image/edit/auto-orient/remove-exif | Normalizes image rotation and removes EXIF rotation data
|
90
90
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_composite_basic**](docs/EditApi.md#edit_composite_basic) | **POST** /image/edit/composite/{location} | Composite two images together
|
91
91
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_contrast_adaptive**](docs/EditApi.md#edit_contrast_adaptive) | **POST** /image/edit/contrast/{gamma}/adaptive | Adaptively adjust the contrast of the image to be more appealing and easy to see
|
92
|
-
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_polygon**](docs/EditApi.md#edit_draw_polygon) | **POST** /image/edit/draw/polygon | Draw polygon onto an image
|
93
|
-
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_rectangle**](docs/EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw rectangle onto an image
|
92
|
+
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_polygon**](docs/EditApi.md#edit_draw_polygon) | **POST** /image/edit/draw/polygon | Draw a polygon onto an image
|
93
|
+
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_rectangle**](docs/EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw a rectangle onto an image
|
94
94
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_draw_text**](docs/EditApi.md#edit_draw_text) | **POST** /image/edit/draw/text | Draw text onto an image
|
95
95
|
*CloudmersiveImageRecognitionApiClient::EditApi* | [**edit_rotate**](docs/EditApi.md#edit_rotate) | **POST** /image/edit/rotate/{degrees}/angle | Rotate an image any number of degrees
|
96
96
|
*CloudmersiveImageRecognitionApiClient::FaceApi* | [**face_compare**](docs/FaceApi.md#face_compare) | **POST** /image/face/compare-and-match | Compare and match faces
|
data/docs/EditApi.md
CHANGED
@@ -7,8 +7,8 @@ Method | HTTP request | Description
|
|
7
7
|
[**edit_auto_orient**](EditApi.md#edit_auto_orient) | **POST** /image/edit/auto-orient/remove-exif | Normalizes image rotation and removes EXIF rotation data
|
8
8
|
[**edit_composite_basic**](EditApi.md#edit_composite_basic) | **POST** /image/edit/composite/{location} | Composite two images together
|
9
9
|
[**edit_contrast_adaptive**](EditApi.md#edit_contrast_adaptive) | **POST** /image/edit/contrast/{gamma}/adaptive | Adaptively adjust the contrast of the image to be more appealing and easy to see
|
10
|
-
[**edit_draw_polygon**](EditApi.md#edit_draw_polygon) | **POST** /image/edit/draw/polygon | Draw polygon onto an image
|
11
|
-
[**edit_draw_rectangle**](EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw rectangle onto an image
|
10
|
+
[**edit_draw_polygon**](EditApi.md#edit_draw_polygon) | **POST** /image/edit/draw/polygon | Draw a polygon onto an image
|
11
|
+
[**edit_draw_rectangle**](EditApi.md#edit_draw_rectangle) | **POST** /image/edit/draw/rectangle | Draw a rectangle onto an image
|
12
12
|
[**edit_draw_text**](EditApi.md#edit_draw_text) | **POST** /image/edit/draw/text | Draw text onto an image
|
13
13
|
[**edit_rotate**](EditApi.md#edit_rotate) | **POST** /image/edit/rotate/{degrees}/angle | Rotate an image any number of degrees
|
14
14
|
|
@@ -185,9 +185,9 @@ Name | Type | Description | Notes
|
|
185
185
|
|
186
186
|
|
187
187
|
# **edit_draw_polygon**
|
188
|
-
>
|
188
|
+
> String edit_draw_polygon(request)
|
189
189
|
|
190
|
-
Draw polygon onto an image
|
190
|
+
Draw a polygon onto an image
|
191
191
|
|
192
192
|
Draw one or more polygons, with customized visuals, onto an image
|
193
193
|
|
@@ -209,7 +209,7 @@ request = CloudmersiveImageRecognitionApiClient::DrawPolygonRequest.new # DrawPo
|
|
209
209
|
|
210
210
|
|
211
211
|
begin
|
212
|
-
#Draw polygon onto an image
|
212
|
+
#Draw a polygon onto an image
|
213
213
|
result = api_instance.edit_draw_polygon(request)
|
214
214
|
p result
|
215
215
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
@@ -225,7 +225,7 @@ Name | Type | Description | Notes
|
|
225
225
|
|
226
226
|
### Return type
|
227
227
|
|
228
|
-
**
|
228
|
+
**String**
|
229
229
|
|
230
230
|
### Authorization
|
231
231
|
|
@@ -241,7 +241,7 @@ Name | Type | Description | Notes
|
|
241
241
|
# **edit_draw_rectangle**
|
242
242
|
> String edit_draw_rectangle(request)
|
243
243
|
|
244
|
-
Draw rectangle onto an image
|
244
|
+
Draw a rectangle onto an image
|
245
245
|
|
246
246
|
Draw one or more rectangles, with customized visuals, onto an image
|
247
247
|
|
@@ -263,7 +263,7 @@ request = CloudmersiveImageRecognitionApiClient::DrawRectangleRequest.new # Draw
|
|
263
263
|
|
264
264
|
|
265
265
|
begin
|
266
|
-
#Draw rectangle onto an image
|
266
|
+
#Draw a rectangle onto an image
|
267
267
|
result = api_instance.edit_draw_rectangle(request)
|
268
268
|
p result
|
269
269
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
@@ -347,7 +347,7 @@ Name | Type | Description | Notes
|
|
347
347
|
|
348
348
|
|
349
349
|
# **edit_rotate**
|
350
|
-
>
|
350
|
+
> String edit_rotate(degrees, image_file)
|
351
351
|
|
352
352
|
Rotate an image any number of degrees
|
353
353
|
|
@@ -369,10 +369,12 @@ api_instance = CloudmersiveImageRecognitionApiClient::EditApi.new
|
|
369
369
|
|
370
370
|
degrees = 1.2 # Float | Degrees to rotate the image; values range from 0.0 to 360.0.
|
371
371
|
|
372
|
+
image_file = File.new("/path/to/file.txt") # File | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
373
|
+
|
372
374
|
|
373
375
|
begin
|
374
376
|
#Rotate an image any number of degrees
|
375
|
-
result = api_instance.edit_rotate(degrees)
|
377
|
+
result = api_instance.edit_rotate(degrees, image_file)
|
376
378
|
p result
|
377
379
|
rescue CloudmersiveImageRecognitionApiClient::ApiError => e
|
378
380
|
puts "Exception when calling EditApi->edit_rotate: #{e}"
|
@@ -384,10 +386,11 @@ end
|
|
384
386
|
Name | Type | Description | Notes
|
385
387
|
------------- | ------------- | ------------- | -------------
|
386
388
|
**degrees** | **Float**| Degrees to rotate the image; values range from 0.0 to 360.0. |
|
389
|
+
**image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
|
387
390
|
|
388
391
|
### Return type
|
389
392
|
|
390
|
-
**
|
393
|
+
**String**
|
391
394
|
|
392
395
|
### Authorization
|
393
396
|
|
@@ -395,7 +398,7 @@ Name | Type | Description | Notes
|
|
395
398
|
|
396
399
|
### HTTP request headers
|
397
400
|
|
398
|
-
- **Content-Type**:
|
401
|
+
- **Content-Type**: multipart/form-data
|
399
402
|
- **Accept**: application/octet-stream
|
400
403
|
|
401
404
|
|
@@ -207,21 +207,21 @@ module CloudmersiveImageRecognitionApiClient
|
|
207
207
|
return data, status_code, headers
|
208
208
|
end
|
209
209
|
|
210
|
-
# Draw polygon onto an image
|
210
|
+
# Draw a polygon onto an image
|
211
211
|
# Draw one or more polygons, with customized visuals, onto an image
|
212
212
|
# @param request
|
213
213
|
# @param [Hash] opts the optional parameters
|
214
|
-
# @return [
|
214
|
+
# @return [String]
|
215
215
|
def edit_draw_polygon(request, opts = {})
|
216
216
|
data, _status_code, _headers = edit_draw_polygon_with_http_info(request, opts)
|
217
217
|
return data
|
218
218
|
end
|
219
219
|
|
220
|
-
# Draw polygon onto an image
|
220
|
+
# Draw a polygon onto an image
|
221
221
|
# Draw one or more polygons, with customized visuals, onto an image
|
222
222
|
# @param request
|
223
223
|
# @param [Hash] opts the optional parameters
|
224
|
-
# @return [Array<(
|
224
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
225
225
|
def edit_draw_polygon_with_http_info(request, opts = {})
|
226
226
|
if @api_client.config.debugging
|
227
227
|
@api_client.config.logger.debug "Calling API: EditApi.edit_draw_polygon ..."
|
@@ -255,14 +255,14 @@ module CloudmersiveImageRecognitionApiClient
|
|
255
255
|
:form_params => form_params,
|
256
256
|
:body => post_body,
|
257
257
|
:auth_names => auth_names,
|
258
|
-
:return_type => '
|
258
|
+
:return_type => 'String')
|
259
259
|
if @api_client.config.debugging
|
260
260
|
@api_client.config.logger.debug "API called: EditApi#edit_draw_polygon\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
261
261
|
end
|
262
262
|
return data, status_code, headers
|
263
263
|
end
|
264
264
|
|
265
|
-
# Draw rectangle onto an image
|
265
|
+
# Draw a rectangle onto an image
|
266
266
|
# Draw one or more rectangles, with customized visuals, onto an image
|
267
267
|
# @param request
|
268
268
|
# @param [Hash] opts the optional parameters
|
@@ -272,7 +272,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
272
272
|
return data
|
273
273
|
end
|
274
274
|
|
275
|
-
# Draw rectangle onto an image
|
275
|
+
# Draw a rectangle onto an image
|
276
276
|
# Draw one or more rectangles, with customized visuals, onto an image
|
277
277
|
# @param request
|
278
278
|
# @param [Hash] opts the optional parameters
|
@@ -375,19 +375,21 @@ module CloudmersiveImageRecognitionApiClient
|
|
375
375
|
# Rotate an image any number of degrees
|
376
376
|
# Rotates an image by an arbitrary number of degrees
|
377
377
|
# @param degrees Degrees to rotate the image; values range from 0.0 to 360.0.
|
378
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
378
379
|
# @param [Hash] opts the optional parameters
|
379
|
-
# @return [
|
380
|
-
def edit_rotate(degrees, opts = {})
|
381
|
-
data, _status_code, _headers = edit_rotate_with_http_info(degrees, opts)
|
380
|
+
# @return [String]
|
381
|
+
def edit_rotate(degrees, image_file, opts = {})
|
382
|
+
data, _status_code, _headers = edit_rotate_with_http_info(degrees, image_file, opts)
|
382
383
|
return data
|
383
384
|
end
|
384
385
|
|
385
386
|
# Rotate an image any number of degrees
|
386
387
|
# Rotates an image by an arbitrary number of degrees
|
387
388
|
# @param degrees Degrees to rotate the image; values range from 0.0 to 360.0.
|
389
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
388
390
|
# @param [Hash] opts the optional parameters
|
389
|
-
# @return [Array<(
|
390
|
-
def edit_rotate_with_http_info(degrees, opts = {})
|
391
|
+
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
392
|
+
def edit_rotate_with_http_info(degrees, image_file, opts = {})
|
391
393
|
if @api_client.config.debugging
|
392
394
|
@api_client.config.logger.debug "Calling API: EditApi.edit_rotate ..."
|
393
395
|
end
|
@@ -395,6 +397,10 @@ module CloudmersiveImageRecognitionApiClient
|
|
395
397
|
if @api_client.config.client_side_validation && degrees.nil?
|
396
398
|
fail ArgumentError, "Missing the required parameter 'degrees' when calling EditApi.edit_rotate"
|
397
399
|
end
|
400
|
+
# verify the required parameter 'image_file' is set
|
401
|
+
if @api_client.config.client_side_validation && image_file.nil?
|
402
|
+
fail ArgumentError, "Missing the required parameter 'image_file' when calling EditApi.edit_rotate"
|
403
|
+
end
|
398
404
|
# resource path
|
399
405
|
local_var_path = "/image/edit/rotate/{degrees}/angle".sub('{' + 'degrees' + '}', degrees.to_s)
|
400
406
|
|
@@ -405,9 +411,12 @@ module CloudmersiveImageRecognitionApiClient
|
|
405
411
|
header_params = {}
|
406
412
|
# HTTP header 'Accept' (if needed)
|
407
413
|
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
414
|
+
# HTTP header 'Content-Type'
|
415
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
408
416
|
|
409
417
|
# form parameters
|
410
418
|
form_params = {}
|
419
|
+
form_params["imageFile"] = image_file
|
411
420
|
|
412
421
|
# http body (model)
|
413
422
|
post_body = nil
|
@@ -418,7 +427,7 @@ module CloudmersiveImageRecognitionApiClient
|
|
418
427
|
:form_params => form_params,
|
419
428
|
:body => post_body,
|
420
429
|
:auth_names => auth_names,
|
421
|
-
:return_type => '
|
430
|
+
:return_type => 'String')
|
422
431
|
if @api_client.config.debugging
|
423
432
|
@api_client.config.logger.debug "API called: EditApi#edit_rotate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
424
433
|
end
|
data/spec/api/edit_api_spec.rb
CHANGED
@@ -72,11 +72,11 @@ describe 'EditApi' do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
# unit tests for edit_draw_polygon
|
75
|
-
# Draw polygon onto an image
|
75
|
+
# Draw a polygon onto an image
|
76
76
|
# Draw one or more polygons, with customized visuals, onto an image
|
77
77
|
# @param request
|
78
78
|
# @param [Hash] opts the optional parameters
|
79
|
-
# @return [
|
79
|
+
# @return [String]
|
80
80
|
describe 'edit_draw_polygon test' do
|
81
81
|
it "should work" do
|
82
82
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
@@ -84,7 +84,7 @@ describe 'EditApi' do
|
|
84
84
|
end
|
85
85
|
|
86
86
|
# unit tests for edit_draw_rectangle
|
87
|
-
# Draw rectangle onto an image
|
87
|
+
# Draw a rectangle onto an image
|
88
88
|
# Draw one or more rectangles, with customized visuals, onto an image
|
89
89
|
# @param request
|
90
90
|
# @param [Hash] opts the optional parameters
|
@@ -111,8 +111,9 @@ describe 'EditApi' do
|
|
111
111
|
# Rotate an image any number of degrees
|
112
112
|
# Rotates an image by an arbitrary number of degrees
|
113
113
|
# @param degrees Degrees to rotate the image; values range from 0.0 to 360.0.
|
114
|
+
# @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
|
114
115
|
# @param [Hash] opts the optional parameters
|
115
|
-
# @return [
|
116
|
+
# @return [String]
|
116
117
|
describe 'edit_rotate test' do
|
117
118
|
it "should work" do
|
118
119
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|