cloudmersive-image-recognition-api-client 1.4.2 → 2.0.1

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.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. metadata +3 -139
  3. data/Gemfile +0 -7
  4. data/README.md +0 -174
  5. data/Rakefile +0 -8
  6. data/cloudmersive-image-recognition-api-client.gemspec +0 -45
  7. data/docs/AgeDetectionResult.md +0 -10
  8. data/docs/ArtisticApi.md +0 -66
  9. data/docs/ColorResult.md +0 -10
  10. data/docs/ConvertApi.md +0 -176
  11. data/docs/DetectedLicensePlate.md +0 -14
  12. data/docs/DetectedObject.md +0 -13
  13. data/docs/DominantColorResult.md +0 -9
  14. data/docs/DrawPolygonInstance.md +0 -11
  15. data/docs/DrawPolygonRequest.md +0 -10
  16. data/docs/DrawRectangleInstance.md +0 -14
  17. data/docs/DrawRectangleRequest.md +0 -10
  18. data/docs/DrawTextInstance.md +0 -15
  19. data/docs/DrawTextRequest.md +0 -10
  20. data/docs/EditApi.md +0 -539
  21. data/docs/Face.md +0 -11
  22. data/docs/FaceApi.md +0 -396
  23. data/docs/FaceCompareResponse.md +0 -11
  24. data/docs/FaceLocateResponse.md +0 -11
  25. data/docs/FaceLocateWithLandmarksResponse.md +0 -11
  26. data/docs/FaceMatch.md +0 -13
  27. data/docs/FacePoint.md +0 -9
  28. data/docs/FaceWithLandmarks.md +0 -20
  29. data/docs/FilterApi.md +0 -478
  30. data/docs/FindSymbolResult.md +0 -13
  31. data/docs/FineTextDetectionResult.md +0 -10
  32. data/docs/FineTextItem.md +0 -18
  33. data/docs/GenderDetectionResult.md +0 -10
  34. data/docs/ImageDescriptionResponse.md +0 -11
  35. data/docs/InfoApi.md +0 -63
  36. data/docs/NsfwApi.md +0 -63
  37. data/docs/NsfwResult.md +0 -10
  38. data/docs/ObjectDetectionResult.md +0 -10
  39. data/docs/PersonWithAge.md +0 -11
  40. data/docs/PersonWithGender.md +0 -10
  41. data/docs/PolygonPoint.md +0 -9
  42. data/docs/RecognitionOutcome.md +0 -9
  43. data/docs/RecognizeApi.md +0 -455
  44. data/docs/ResizeApi.md +0 -130
  45. data/docs/TextDetectionResult.md +0 -10
  46. data/docs/TextItem.md +0 -11
  47. data/docs/VehicleLicensePlateDetectionResult.md +0 -10
  48. data/git_push.sh +0 -55
  49. data/lib/cloudmersive-image-recognition-api-client.rb +0 -80
  50. data/lib/cloudmersive-image-recognition-api-client/api/artistic_api.rb +0 -85
  51. data/lib/cloudmersive-image-recognition-api-client/api/convert_api.rb +0 -197
  52. data/lib/cloudmersive-image-recognition-api-client/api/edit_api.rb +0 -597
  53. data/lib/cloudmersive-image-recognition-api-client/api/face_api.rb +0 -422
  54. data/lib/cloudmersive-image-recognition-api-client/api/filter_api.rb +0 -533
  55. data/lib/cloudmersive-image-recognition-api-client/api/info_api.rb +0 -79
  56. data/lib/cloudmersive-image-recognition-api-client/api/nsfw_api.rb +0 -79
  57. data/lib/cloudmersive-image-recognition-api-client/api/recognize_api.rb +0 -481
  58. data/lib/cloudmersive-image-recognition-api-client/api/resize_api.rb +0 -159
  59. data/lib/cloudmersive-image-recognition-api-client/api_client.rb +0 -389
  60. data/lib/cloudmersive-image-recognition-api-client/api_error.rb +0 -38
  61. data/lib/cloudmersive-image-recognition-api-client/configuration.rb +0 -209
  62. data/lib/cloudmersive-image-recognition-api-client/models/age_detection_result.rb +0 -211
  63. data/lib/cloudmersive-image-recognition-api-client/models/color_result.rb +0 -209
  64. data/lib/cloudmersive-image-recognition-api-client/models/detected_license_plate.rb +0 -249
  65. data/lib/cloudmersive-image-recognition-api-client/models/detected_object.rb +0 -239
  66. data/lib/cloudmersive-image-recognition-api-client/models/dominant_color_result.rb +0 -201
  67. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_instance.rb +0 -221
  68. data/lib/cloudmersive-image-recognition-api-client/models/draw_polygon_request.rb +0 -227
  69. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_instance.rb +0 -249
  70. data/lib/cloudmersive-image-recognition-api-client/models/draw_rectangle_request.rb +0 -227
  71. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_instance.rb +0 -259
  72. data/lib/cloudmersive-image-recognition-api-client/models/draw_text_request.rb +0 -227
  73. data/lib/cloudmersive-image-recognition-api-client/models/face.rb +0 -219
  74. data/lib/cloudmersive-image-recognition-api-client/models/face_compare_response.rb +0 -221
  75. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_response.rb +0 -220
  76. data/lib/cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response.rb +0 -221
  77. data/lib/cloudmersive-image-recognition-api-client/models/face_match.rb +0 -239
  78. data/lib/cloudmersive-image-recognition-api-client/models/face_point.rb +0 -199
  79. data/lib/cloudmersive-image-recognition-api-client/models/face_with_landmarks.rb +0 -327
  80. data/lib/cloudmersive-image-recognition-api-client/models/find_symbol_result.rb +0 -239
  81. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_detection_result.rb +0 -211
  82. data/lib/cloudmersive-image-recognition-api-client/models/fine_text_item.rb +0 -289
  83. data/lib/cloudmersive-image-recognition-api-client/models/gender_detection_result.rb +0 -211
  84. data/lib/cloudmersive-image-recognition-api-client/models/image_description_response.rb +0 -219
  85. data/lib/cloudmersive-image-recognition-api-client/models/nsfw_result.rb +0 -209
  86. data/lib/cloudmersive-image-recognition-api-client/models/object_detection_result.rb +0 -211
  87. data/lib/cloudmersive-image-recognition-api-client/models/person_with_age.rb +0 -218
  88. data/lib/cloudmersive-image-recognition-api-client/models/person_with_gender.rb +0 -209
  89. data/lib/cloudmersive-image-recognition-api-client/models/polygon_point.rb +0 -199
  90. data/lib/cloudmersive-image-recognition-api-client/models/recognition_outcome.rb +0 -199
  91. data/lib/cloudmersive-image-recognition-api-client/models/text_detection_result.rb +0 -211
  92. data/lib/cloudmersive-image-recognition-api-client/models/text_item.rb +0 -219
  93. data/lib/cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result.rb +0 -211
  94. data/lib/cloudmersive-image-recognition-api-client/version.rb +0 -15
  95. data/spec/api/artistic_api_spec.rb +0 -48
  96. data/spec/api/convert_api_spec.rb +0 -72
  97. data/spec/api/edit_api_spec.rb +0 -155
  98. data/spec/api/face_api_spec.rb +0 -120
  99. data/spec/api/filter_api_spec.rb +0 -141
  100. data/spec/api/info_api_spec.rb +0 -47
  101. data/spec/api/nsfw_api_spec.rb +0 -47
  102. data/spec/api/recognize_api_spec.rb +0 -133
  103. data/spec/api/resize_api_spec.rb +0 -63
  104. data/spec/api_client_spec.rb +0 -226
  105. data/spec/configuration_spec.rb +0 -42
  106. data/spec/models/age_detection_result_spec.rb +0 -54
  107. data/spec/models/color_result_spec.rb +0 -54
  108. data/spec/models/detected_license_plate_spec.rb +0 -78
  109. data/spec/models/detected_object_spec.rb +0 -72
  110. data/spec/models/dominant_color_result_spec.rb +0 -48
  111. data/spec/models/draw_polygon_instance_spec.rb +0 -60
  112. data/spec/models/draw_polygon_request_spec.rb +0 -54
  113. data/spec/models/draw_rectangle_instance_spec.rb +0 -78
  114. data/spec/models/draw_rectangle_request_spec.rb +0 -54
  115. data/spec/models/draw_text_instance_spec.rb +0 -84
  116. data/spec/models/draw_text_request_spec.rb +0 -54
  117. data/spec/models/face_compare_response_spec.rb +0 -60
  118. data/spec/models/face_locate_response_spec.rb +0 -60
  119. data/spec/models/face_locate_with_landmarks_response_spec.rb +0 -60
  120. data/spec/models/face_match_spec.rb +0 -72
  121. data/spec/models/face_point_spec.rb +0 -48
  122. data/spec/models/face_spec.rb +0 -60
  123. data/spec/models/face_with_landmarks_spec.rb +0 -114
  124. data/spec/models/find_symbol_result_spec.rb +0 -72
  125. data/spec/models/fine_text_detection_result_spec.rb +0 -54
  126. data/spec/models/fine_text_item_spec.rb +0 -102
  127. data/spec/models/gender_detection_result_spec.rb +0 -54
  128. data/spec/models/image_description_response_spec.rb +0 -60
  129. data/spec/models/nsfw_result_spec.rb +0 -54
  130. data/spec/models/object_detection_result_spec.rb +0 -54
  131. data/spec/models/person_with_age_spec.rb +0 -60
  132. data/spec/models/person_with_gender_spec.rb +0 -54
  133. data/spec/models/polygon_point_spec.rb +0 -48
  134. data/spec/models/recognition_outcome_spec.rb +0 -48
  135. data/spec/models/text_detection_result_spec.rb +0 -54
  136. data/spec/models/text_item_spec.rb +0 -60
  137. data/spec/models/vehicle_license_plate_detection_result_spec.rb +0 -54
  138. data/spec/spec_helper.rb +0 -111
@@ -1,130 +0,0 @@
1
- # CloudmersiveImageRecognitionApiClient::ResizeApi
2
-
3
- All URIs are relative to *https://api.cloudmersive.com*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**resize_post**](ResizeApi.md#resize_post) | **POST** /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} | Resize an image while preserving aspect ratio
8
- [**resize_resize_simple**](ResizeApi.md#resize_resize_simple) | **POST** /image/resize/target/{width}/{height} | Resize an image
9
-
10
-
11
- # **resize_post**
12
- > String resize_post(max_width, max_height, image_file)
13
-
14
- Resize an image while preserving aspect ratio
15
-
16
- Resize an image to a maximum width and maximum height, while preserving the image's original aspect ratio
17
-
18
- ### Example
19
- ```ruby
20
- # load the gem
21
- require 'cloudmersive-image-recognition-api-client'
22
- # setup authorization
23
- CloudmersiveImageRecognitionApiClient.configure do |config|
24
- # Configure API key authorization: Apikey
25
- config.api_key['Apikey'] = 'YOUR API KEY'
26
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
- #config.api_key_prefix['Apikey'] = 'Bearer'
28
- end
29
-
30
- api_instance = CloudmersiveImageRecognitionApiClient::ResizeApi.new
31
-
32
- max_width = 56 # Integer | Maximum width of the output image - final image will be as large as possible while less than or equial to this width
33
-
34
- max_height = 56 # Integer | Maximum height of the output image - final image will be as large as possible while less than or equial to this height
35
-
36
- 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.
37
-
38
-
39
- begin
40
- #Resize an image while preserving aspect ratio
41
- result = api_instance.resize_post(max_width, max_height, image_file)
42
- p result
43
- rescue CloudmersiveImageRecognitionApiClient::ApiError => e
44
- puts "Exception when calling ResizeApi->resize_post: #{e}"
45
- end
46
- ```
47
-
48
- ### Parameters
49
-
50
- Name | Type | Description | Notes
51
- ------------- | ------------- | ------------- | -------------
52
- **max_width** | **Integer**| Maximum width of the output image - final image will be as large as possible while less than or equial to this width |
53
- **max_height** | **Integer**| Maximum height of the output image - final image will be as large as possible while less than or equial to this height |
54
- **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
55
-
56
- ### Return type
57
-
58
- **String**
59
-
60
- ### Authorization
61
-
62
- [Apikey](../README.md#Apikey)
63
-
64
- ### HTTP request headers
65
-
66
- - **Content-Type**: multipart/form-data
67
- - **Accept**: image/png
68
-
69
-
70
-
71
- # **resize_resize_simple**
72
- > String resize_resize_simple(width, height, image_file)
73
-
74
- Resize an image
75
-
76
- Resize an image to a specific width and specific height
77
-
78
- ### Example
79
- ```ruby
80
- # load the gem
81
- require 'cloudmersive-image-recognition-api-client'
82
- # setup authorization
83
- CloudmersiveImageRecognitionApiClient.configure do |config|
84
- # Configure API key authorization: Apikey
85
- config.api_key['Apikey'] = 'YOUR API KEY'
86
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
87
- #config.api_key_prefix['Apikey'] = 'Bearer'
88
- end
89
-
90
- api_instance = CloudmersiveImageRecognitionApiClient::ResizeApi.new
91
-
92
- width = 56 # Integer |
93
-
94
- height = 56 # Integer |
95
-
96
- 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.
97
-
98
-
99
- begin
100
- #Resize an image
101
- result = api_instance.resize_resize_simple(width, height, image_file)
102
- p result
103
- rescue CloudmersiveImageRecognitionApiClient::ApiError => e
104
- puts "Exception when calling ResizeApi->resize_resize_simple: #{e}"
105
- end
106
- ```
107
-
108
- ### Parameters
109
-
110
- Name | Type | Description | Notes
111
- ------------- | ------------- | ------------- | -------------
112
- **width** | **Integer**| |
113
- **height** | **Integer**| |
114
- **image_file** | **File**| Image file to perform the operation on. Common file formats such as PNG, JPEG are supported. |
115
-
116
- ### Return type
117
-
118
- **String**
119
-
120
- ### Authorization
121
-
122
- [Apikey](../README.md#Apikey)
123
-
124
- ### HTTP request headers
125
-
126
- - **Content-Type**: multipart/form-data
127
- - **Accept**: image/png
128
-
129
-
130
-
@@ -1,10 +0,0 @@
1
- # CloudmersiveImageRecognitionApiClient::TextDetectionResult
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
- **text_items** | [**Array<TextItem>**](TextItem.md) | Text items found in the input image | [optional]
8
- **text_items_count** | **Integer** | Count of text items found in the input image | [optional]
9
-
10
-
@@ -1,11 +0,0 @@
1
- # CloudmersiveImageRecognitionApiClient::TextItem
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **left_x** | **Integer** | Left X coordinate of the text location; 0 represents the left edge of the input image | [optional]
7
- **top_y** | **Integer** | Top Y coordinate of the text location; 0 represents the top edge of the input image | [optional]
8
- **width** | **Integer** | Width in pixels of the text item | [optional]
9
- **height** | **Integer** | Height in pixels of the text item | [optional]
10
-
11
-
@@ -1,10 +0,0 @@
1
- # CloudmersiveImageRecognitionApiClient::VehicleLicensePlateDetectionResult
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **successful** | **BOOLEAN** | Was the image processed successfully? | [optional]
7
- **detected_license_plates** | [**Array<DetectedLicensePlate>**](DetectedLicensePlate.md) | License plates found in the image | [optional]
8
- **detected_license_plate_count** | **Integer** | The number of license plates detected in the image | [optional]
9
-
10
-
@@ -1,55 +0,0 @@
1
- #!/bin/sh
2
- #
3
- # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
- #
5
- # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
- #
7
- # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
-
9
- git_user_id=$1
10
- git_repo_id=$2
11
- release_note=$3
12
-
13
- if [ "$git_user_id" = "" ]; then
14
- git_user_id="GIT_USER_ID"
15
- echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
- fi
17
-
18
- if [ "$git_repo_id" = "" ]; then
19
- git_repo_id="GIT_REPO_ID"
20
- echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
- fi
22
-
23
- if [ "$release_note" = "" ]; then
24
- release_note="Minor update"
25
- echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
- fi
27
-
28
- # Initialize the local directory as a Git repository
29
- git init
30
-
31
- # Adds the files in the local repository and stages them for commit.
32
- git add .
33
-
34
- # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
- git commit -m "$release_note"
36
-
37
- # Sets the new remote
38
- git_remote=`git remote`
39
- if [ "$git_remote" = "" ]; then # git remote not defined
40
-
41
- if [ "$GIT_TOKEN" = "" ]; then
42
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
- git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
- else
45
- git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
- fi
47
-
48
- fi
49
-
50
- git pull origin master
51
-
52
- # Pushes (Forces) the changes in the local repository up to the remote repository
53
- echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
- git push origin master 2>&1 | grep -v 'To https'
55
-
@@ -1,80 +0,0 @@
1
- =begin
2
- #imageapi
3
-
4
- #Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- # Common files
14
- require 'cloudmersive-image-recognition-api-client/api_client'
15
- require 'cloudmersive-image-recognition-api-client/api_error'
16
- require 'cloudmersive-image-recognition-api-client/version'
17
- require 'cloudmersive-image-recognition-api-client/configuration'
18
-
19
- # Models
20
- require 'cloudmersive-image-recognition-api-client/models/age_detection_result'
21
- require 'cloudmersive-image-recognition-api-client/models/color_result'
22
- require 'cloudmersive-image-recognition-api-client/models/detected_license_plate'
23
- require 'cloudmersive-image-recognition-api-client/models/detected_object'
24
- require 'cloudmersive-image-recognition-api-client/models/dominant_color_result'
25
- require 'cloudmersive-image-recognition-api-client/models/draw_polygon_instance'
26
- require 'cloudmersive-image-recognition-api-client/models/draw_polygon_request'
27
- require 'cloudmersive-image-recognition-api-client/models/draw_rectangle_instance'
28
- require 'cloudmersive-image-recognition-api-client/models/draw_rectangle_request'
29
- require 'cloudmersive-image-recognition-api-client/models/draw_text_instance'
30
- require 'cloudmersive-image-recognition-api-client/models/draw_text_request'
31
- require 'cloudmersive-image-recognition-api-client/models/face'
32
- require 'cloudmersive-image-recognition-api-client/models/face_compare_response'
33
- require 'cloudmersive-image-recognition-api-client/models/face_locate_response'
34
- require 'cloudmersive-image-recognition-api-client/models/face_locate_with_landmarks_response'
35
- require 'cloudmersive-image-recognition-api-client/models/face_match'
36
- require 'cloudmersive-image-recognition-api-client/models/face_point'
37
- require 'cloudmersive-image-recognition-api-client/models/face_with_landmarks'
38
- require 'cloudmersive-image-recognition-api-client/models/find_symbol_result'
39
- require 'cloudmersive-image-recognition-api-client/models/fine_text_detection_result'
40
- require 'cloudmersive-image-recognition-api-client/models/fine_text_item'
41
- require 'cloudmersive-image-recognition-api-client/models/gender_detection_result'
42
- require 'cloudmersive-image-recognition-api-client/models/image_description_response'
43
- require 'cloudmersive-image-recognition-api-client/models/nsfw_result'
44
- require 'cloudmersive-image-recognition-api-client/models/object_detection_result'
45
- require 'cloudmersive-image-recognition-api-client/models/person_with_age'
46
- require 'cloudmersive-image-recognition-api-client/models/person_with_gender'
47
- require 'cloudmersive-image-recognition-api-client/models/polygon_point'
48
- require 'cloudmersive-image-recognition-api-client/models/recognition_outcome'
49
- require 'cloudmersive-image-recognition-api-client/models/text_detection_result'
50
- require 'cloudmersive-image-recognition-api-client/models/text_item'
51
- require 'cloudmersive-image-recognition-api-client/models/vehicle_license_plate_detection_result'
52
-
53
- # APIs
54
- require 'cloudmersive-image-recognition-api-client/api/artistic_api'
55
- require 'cloudmersive-image-recognition-api-client/api/convert_api'
56
- require 'cloudmersive-image-recognition-api-client/api/edit_api'
57
- require 'cloudmersive-image-recognition-api-client/api/face_api'
58
- require 'cloudmersive-image-recognition-api-client/api/filter_api'
59
- require 'cloudmersive-image-recognition-api-client/api/info_api'
60
- require 'cloudmersive-image-recognition-api-client/api/nsfw_api'
61
- require 'cloudmersive-image-recognition-api-client/api/recognize_api'
62
- require 'cloudmersive-image-recognition-api-client/api/resize_api'
63
-
64
- module CloudmersiveImageRecognitionApiClient
65
- class << self
66
- # Customize default settings for the SDK using block.
67
- # CloudmersiveImageRecognitionApiClient.configure do |config|
68
- # config.username = "xxx"
69
- # config.password = "xxx"
70
- # end
71
- # If no block given, return the default Configuration object.
72
- def configure
73
- if block_given?
74
- yield(Configuration.default)
75
- else
76
- Configuration.default
77
- end
78
- end
79
- end
80
- end
@@ -1,85 +0,0 @@
1
- =begin
2
- #imageapi
3
-
4
- #Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require "uri"
14
-
15
- module CloudmersiveImageRecognitionApiClient
16
- class ArtisticApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
-
23
- # Transform an image into an artistic painting automatically
24
- # Uses machine learning to automatically transform an image into an artistic painting. Due to depth of AI processing, depending on image size this operation can take up to 20 seconds.
25
- # @param style The style of the painting to apply. To start, try \&quot;udnie\&quot; a painting style. Possible values are: \&quot;udnie\&quot;, \&quot;wave\&quot;, \&quot;la_muse\&quot;, \&quot;rain_princess\&quot;.
26
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
27
- # @param [Hash] opts the optional parameters
28
- # @return [String]
29
- def artistic_painting(style, image_file, opts = {})
30
- data, _status_code, _headers = artistic_painting_with_http_info(style, image_file, opts)
31
- return data
32
- end
33
-
34
- # Transform an image into an artistic painting automatically
35
- # Uses machine learning to automatically transform an image into an artistic painting. Due to depth of AI processing, depending on image size this operation can take up to 20 seconds.
36
- # @param style The style of the painting to apply. To start, try \&quot;udnie\&quot; a painting style. Possible values are: \&quot;udnie\&quot;, \&quot;wave\&quot;, \&quot;la_muse\&quot;, \&quot;rain_princess\&quot;.
37
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
38
- # @param [Hash] opts the optional parameters
39
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
40
- def artistic_painting_with_http_info(style, image_file, opts = {})
41
- if @api_client.config.debugging
42
- @api_client.config.logger.debug "Calling API: ArtisticApi.artistic_painting ..."
43
- end
44
- # verify the required parameter 'style' is set
45
- if @api_client.config.client_side_validation && style.nil?
46
- fail ArgumentError, "Missing the required parameter 'style' when calling ArtisticApi.artistic_painting"
47
- end
48
- # verify the required parameter 'image_file' is set
49
- if @api_client.config.client_side_validation && image_file.nil?
50
- fail ArgumentError, "Missing the required parameter 'image_file' when calling ArtisticApi.artistic_painting"
51
- end
52
- # resource path
53
- local_var_path = "/image/artistic/painting/{style}".sub('{' + 'style' + '}', style.to_s)
54
-
55
- # query parameters
56
- query_params = {}
57
-
58
- # header parameters
59
- header_params = {}
60
- # HTTP header 'Accept' (if needed)
61
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
62
- # HTTP header 'Content-Type'
63
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
64
-
65
- # form parameters
66
- form_params = {}
67
- form_params["imageFile"] = image_file
68
-
69
- # http body (model)
70
- post_body = nil
71
- auth_names = ['Apikey']
72
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
73
- :header_params => header_params,
74
- :query_params => query_params,
75
- :form_params => form_params,
76
- :body => post_body,
77
- :auth_names => auth_names,
78
- :return_type => 'String')
79
- if @api_client.config.debugging
80
- @api_client.config.logger.debug "API called: ArtisticApi#artistic_painting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
- end
82
- return data, status_code, headers
83
- end
84
- end
85
- end
@@ -1,197 +0,0 @@
1
- =begin
2
- #imageapi
3
-
4
- #Image Recognition and Processing APIs let you use Machine Learning to recognize and process images, and also perform useful image modification operations.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require "uri"
14
-
15
- module CloudmersiveImageRecognitionApiClient
16
- class ConvertApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
-
23
- # Convert input image to GIF format
24
- # Converts the input image into GIF format. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
25
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
26
- # @param [Hash] opts the optional parameters
27
- # @return [String]
28
- def convert_to_gif(image_file, opts = {})
29
- data, _status_code, _headers = convert_to_gif_with_http_info(image_file, opts)
30
- return data
31
- end
32
-
33
- # Convert input image to GIF format
34
- # Converts the input image into GIF format. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
35
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
36
- # @param [Hash] opts the optional parameters
37
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
38
- def convert_to_gif_with_http_info(image_file, opts = {})
39
- if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: ConvertApi.convert_to_gif ..."
41
- end
42
- # verify the required parameter 'image_file' is set
43
- if @api_client.config.client_side_validation && image_file.nil?
44
- fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_gif"
45
- end
46
- # resource path
47
- local_var_path = "/image/convert/to/gif"
48
-
49
- # query parameters
50
- query_params = {}
51
-
52
- # header parameters
53
- header_params = {}
54
- # HTTP header 'Accept' (if needed)
55
- header_params['Accept'] = @api_client.select_header_accept(['image/gif'])
56
- # HTTP header 'Content-Type'
57
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
58
-
59
- # form parameters
60
- form_params = {}
61
- form_params["imageFile"] = image_file
62
-
63
- # http body (model)
64
- post_body = nil
65
- auth_names = ['Apikey']
66
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
67
- :header_params => header_params,
68
- :query_params => query_params,
69
- :form_params => form_params,
70
- :body => post_body,
71
- :auth_names => auth_names,
72
- :return_type => 'String')
73
- if @api_client.config.debugging
74
- @api_client.config.logger.debug "API called: ConvertApi#convert_to_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
- end
76
- return data, status_code, headers
77
- end
78
-
79
- # Convert input image to JPG/JPEG format
80
- # Converts the input image into JPEG/JPG format. Customize encoding parameters. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
81
- # @param quality Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75
82
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
83
- # @param [Hash] opts the optional parameters
84
- # @return [String]
85
- def convert_to_jpg(quality, image_file, opts = {})
86
- data, _status_code, _headers = convert_to_jpg_with_http_info(quality, image_file, opts)
87
- return data
88
- end
89
-
90
- # Convert input image to JPG/JPEG format
91
- # Converts the input image into JPEG/JPG format. Customize encoding parameters. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
92
- # @param quality Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75
93
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
94
- # @param [Hash] opts the optional parameters
95
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
96
- def convert_to_jpg_with_http_info(quality, image_file, opts = {})
97
- if @api_client.config.debugging
98
- @api_client.config.logger.debug "Calling API: ConvertApi.convert_to_jpg ..."
99
- end
100
- # verify the required parameter 'quality' is set
101
- if @api_client.config.client_side_validation && quality.nil?
102
- fail ArgumentError, "Missing the required parameter 'quality' when calling ConvertApi.convert_to_jpg"
103
- end
104
- # verify the required parameter 'image_file' is set
105
- if @api_client.config.client_side_validation && image_file.nil?
106
- fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_jpg"
107
- end
108
- # resource path
109
- local_var_path = "/image/convert/to/jpg/{quality}".sub('{' + 'quality' + '}', quality.to_s)
110
-
111
- # query parameters
112
- query_params = {}
113
-
114
- # header parameters
115
- header_params = {}
116
- # HTTP header 'Accept' (if needed)
117
- header_params['Accept'] = @api_client.select_header_accept(['image/jpg'])
118
- # HTTP header 'Content-Type'
119
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
120
-
121
- # form parameters
122
- form_params = {}
123
- form_params["imageFile"] = image_file
124
-
125
- # http body (model)
126
- post_body = nil
127
- auth_names = ['Apikey']
128
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
129
- :header_params => header_params,
130
- :query_params => query_params,
131
- :form_params => form_params,
132
- :body => post_body,
133
- :auth_names => auth_names,
134
- :return_type => 'String')
135
- if @api_client.config.debugging
136
- @api_client.config.logger.debug "API called: ConvertApi#convert_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
137
- end
138
- return data, status_code, headers
139
- end
140
-
141
- # Convert input image to PNG format
142
- # Converts the input image into PNG format. Transparency is preserved when present. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
143
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
144
- # @param [Hash] opts the optional parameters
145
- # @return [String]
146
- def convert_to_png(image_file, opts = {})
147
- data, _status_code, _headers = convert_to_png_with_http_info(image_file, opts)
148
- return data
149
- end
150
-
151
- # Convert input image to PNG format
152
- # Converts the input image into PNG format. Transparency is preserved when present. Supported input file formats include AAI, ART, ARW, AVS, BPG, BMP, BMP2, BMP3, BRF, CALS, CGM, CIN, CMYK, CMYKA, CR2, CRW, CUR, CUT, DCM, DCR, DCX, DDS, DIB, DJVU, DNG, DOT, DPX, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EXR, FAX, FIG, FITS, FPX, GIF, GPLT, GRAY, HDR, HEIC, HPGL, HRZ, ICO, ISOBRL, ISBRL6, JBIG, JNG, JP2, JPT, J2C, J2K, JPEG/JPG, JXR, MAT, MONO, MNG, M2V, MRW, MTV, NEF, ORF, OTB, P7, PALM, PAM, PBM, PCD, PCDS, PCL, PCX, PDF, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PNG, PNG8, PNG00, PNG24, PNG32, PNG48, PNG64, PNM, PPM, PSB, PSD, PTIF, PWB, RAD, RAF, RGB, RGBA, RGF, RLA, RLE, SCT, SFW, SGI, SID, SUN, SVG, TGA, TIFF, TIM, UIL, VIFF, VICAR, VBMP, WDP, WEBP, WPG, X, XBM, XCF, XPM, XWD, X3F, YCbCr, YCbCrA, YUV.
153
- # @param image_file Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.
154
- # @param [Hash] opts the optional parameters
155
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
156
- def convert_to_png_with_http_info(image_file, opts = {})
157
- if @api_client.config.debugging
158
- @api_client.config.logger.debug "Calling API: ConvertApi.convert_to_png ..."
159
- end
160
- # verify the required parameter 'image_file' is set
161
- if @api_client.config.client_side_validation && image_file.nil?
162
- fail ArgumentError, "Missing the required parameter 'image_file' when calling ConvertApi.convert_to_png"
163
- end
164
- # resource path
165
- local_var_path = "/image/convert/to/png"
166
-
167
- # query parameters
168
- query_params = {}
169
-
170
- # header parameters
171
- header_params = {}
172
- # HTTP header 'Accept' (if needed)
173
- header_params['Accept'] = @api_client.select_header_accept(['image/png'])
174
- # HTTP header 'Content-Type'
175
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
176
-
177
- # form parameters
178
- form_params = {}
179
- form_params["imageFile"] = image_file
180
-
181
- # http body (model)
182
- post_body = nil
183
- auth_names = ['Apikey']
184
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
185
- :header_params => header_params,
186
- :query_params => query_params,
187
- :form_params => form_params,
188
- :body => post_body,
189
- :auth_names => auth_names,
190
- :return_type => 'String')
191
- if @api_client.config.debugging
192
- @api_client.config.logger.debug "API called: ConvertApi#convert_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
193
- end
194
- return data, status_code, headers
195
- end
196
- end
197
- end