aspose_imaging_cloud 20.8 → 21.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90e22614499953c33cc3dac218ecca3f1e4b3771a01b023ddd7fc8260f46677a
4
- data.tar.gz: 58cfb883bde337ef54ff26f532bb133265d4980d6fb3168166ebcc4f9db475d6
3
+ metadata.gz: cf94497d9d36b174512561253ee819a077778a2606d1a955d091d388975011fb
4
+ data.tar.gz: d8912a658bf5f13443512392a1ebbe1757ffa77b79c4229930154779afe140e1
5
5
  SHA512:
6
- metadata.gz: 3afd212cd24083765361735ebf4a343e1fee3f8a30cbd6aed54cf79c8dc1e2f04cc6f59b7ea81668152280322e903724ef4b5c0f55ec389ba22147d07c37d685
7
- data.tar.gz: 0dd2ebc618ebbdcb351b71f65f408508089d57570422a13fd4aecb79b02133b7069697d0f1dd876e8e2e20ac4702df172d8e5d9e215dc3220a70bc3e77c95ced
6
+ metadata.gz: d4ba1382197fd123de6decc4ea4696029fde0fb3e4453c52aecbb3b3f0690a46a5a4726bf6497de7e3cf74b3fd3d6d45f2503ee5e613ab7c74568040bf168061
7
+ data.tar.gz: a31e712c63ba348edfcee41a23252ab83cf6ed66591e711c520b5cc57e4216e21a6a795043da89d2b18c9ace5c9b178405246d7a0b86ce62085e4fa36f98a6e5
data/README.md CHANGED
@@ -1,8 +1,56 @@
1
- # aspose-imaging-cloud
1
+ ![](https://img.shields.io/badge/api-v3.0-lightgrey) ![Gem](https://img.shields.io/gem/v/aspose_imaging_cloud) ![Gem](https://img.shields.io/gem/dt/aspose_words_cloud) [![GitHub license](https://img.shields.io/github/license/aspose-imaging-cloud/aspose-imaging-cloud-ruby)](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-ruby/blob/master/LICENSE)
2
+ ## Image Processing in Cloud via Ruby REST API
3
+ [Aspose.Imaging Cloud](https://products.aspose.cloud/imaging) is a true [REST API](https://apireference.aspose.cloud/imaging/) that enables you to perform a wide range of image processing operations including creation, manipulation and conversion in the cloud, with zero initial costs. Our Cloud SDKs are wrappers around REST API in various programming languages, allowing you to process images in language of your choice quickly and easily, gaining all benefits of strong types and IDE highlights.
2
4
 
3
- AsposeImagingCloud - the Ruby gem for the Aspose.Imaging Cloud API Reference
5
+ This repository contains [Aspose.Imaging Cloud Ruby SDK](https://products.aspose.cloud/imaging/ruby) source code. This SDK allows you to work with Aspose.Imaging Cloud REST APIs in your Python applications quickly and easily, with zero initial cost.
4
6
 
5
- No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7
+ To use this SDK, you will need Client ID and Client secret which can be looked up at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/#/apps) (free registration in Aspose Cloud is required for this).
8
+
9
+ The solution is updated using [code generator](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-codegen).
10
+ ## Image Processing Features
11
+
12
+ - Fetch or update properties of cloud-hosted images.
13
+ - Scale, flip, crop, and export an image with a single API call.
14
+ - Resize, crop, flip, convert, and export an image to other supported formats.
15
+ - Update image parameters of JPEG2000 & WEBP images.
16
+ - Access and multi-frame TIFF image and extract the desired frames from it.
17
+ - Rotate, flip, crop, resize, or fetch properties of the selected TIFF frame.
18
+ - Merge multiple TIFF images.
19
+
20
+ ## Read & Write Image Formats
21
+ BMP, GIF, JPEG, JPEG2000, PSD, TIFF, WEBP, PNG, WMF, EMF, SVG
22
+
23
+ ## Save Image As
24
+ PDF, DICOM
25
+
26
+ ## Read Image Formats
27
+ DJVU, DICOM, CDR, CMX, ODG, DNG, EPS
28
+
29
+ ## Enhancements in Version 20.12
30
+
31
+ - Enhanced the **EPS** file format inheritance to support rotate, resize, flip, etc. operations as vector images support.
32
+ - Improved image loading, conversion, and export features.
33
+ - Added the JavaScript SDK.
34
+
35
+ ## Enhancements in Version 20.9
36
+ - Resumed the support of **Android SDK** and updated reference to Aspose.Imaging and Aspose.PSD.
37
+
38
+
39
+ ## Enhancements in Version 20.10
40
+
41
+ - Support for additional image formats in Object Detection.
42
+ - Support to load and convert **EPS** files to **PDF/A** format.
43
+
44
+ ## Storage API support
45
+ Since version 19.4, SDK includes support of storage operations for better user experience and unification, so now there's no need to use 2 different SDKs!
46
+
47
+ It gives you an ability to:
48
+ * Upload, download, copy, move and delete files, including versions handling (if you are using Cloud storage that supports this feature - true by default)
49
+ * Create, copy, move and delete folders
50
+ * Copy and move files and folders accross separate storages in scope of a single operation
51
+ * Check if certain file, folder or storage exists
52
+
53
+ Detalied official documentation can be found at the [following link](https://docs.aspose.cloud/imaging/).
6
54
 
7
55
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
56
 
@@ -31,7 +79,7 @@ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.or
31
79
 
32
80
  Finally add this to the Gemfile:
33
81
 
34
- gem 'aspose-imaging-cloud', '~> 20.8'
82
+ gem 'aspose-imaging-cloud', '~> 21.12'
35
83
 
36
84
  ### Install from Git
37
85
 
@@ -47,38 +95,15 @@ Include the Ruby code directly using `-I` as follows:
47
95
  ruby -Ilib script.rb
48
96
  ```
49
97
 
50
- ## Getting Started
51
-
52
- Please follow the [installation](#installation) procedure and then run the following code:
53
- ```ruby
54
- # Load the gem
55
- require 'aspose-imaging-cloud'
56
-
57
- # Setup authorization
58
- AsposeImagingCloud.configure do |config|
59
- # Configure OAuth2 access token for authorization: JWT
60
- config.access_token = 'YOUR ACCESS TOKEN'
61
- end
62
-
63
- api_instance = AsposeImagingCloud::ImagingApi.new
64
98
 
65
- search_context_id = 'search_context_id_example' # String | Search context identifier.
99
+ ## Convert PNG to JPG in Ruby
66
100
 
67
- image_id = 'image_id_example' # String | Image identifier.
68
-
69
- opts = {
70
- image_data: File.new('/path/to/file.txt'), # File | Input image
71
- folder: 'folder_example', # String | Folder.
72
- storage: 'storage_example' # String | Storage
73
- }
74
-
75
- begin
76
- #Add image and images features to search context. Image data may be passed as zero-indexed multipart/form-data content or as raw body stream.
77
- api_instance.add_search_image(search_context_id, image_id, opts)
78
- rescue AsposeImagingCloud::ApiError => e
79
- puts "Exception when calling ImagingApi->add_search_image: #{e}"
80
- end
101
+ ```ruby
102
+ # Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).
103
+ api = AsposeImagingCloud::ImagingApi.new("MY_CLIENT_SECRET", "MY_CLIENT_ID")
81
104
 
105
+ requestParam = AsposeImagingCloud::ConvertImageRequest.new("sample.png", "jpg", "tempFolder", "My_Storage_Name")
106
+ result = api.convert_image(requestParam)
82
107
  ```
83
108
 
84
109
  ## Documentation for API Endpoints
@@ -231,6 +256,14 @@ Class | Method | HTTP request | Description
231
256
 
232
257
  - **Type**: OAuth
233
258
  - **Flow**: application
234
- - **Authorization URL**:
259
+ - **Authorization URL**:
235
260
  - **Scopes**: N/A
236
261
 
262
+ ## Aspose.Imaging Cloud SDKs in Popular Languages
263
+
264
+ | .NET | Java | PHP | Python | Ruby | Node.js |Android|
265
+ |---|---|---|---|---|---|--|
266
+ | [GitHub](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-dotnet) | [GitHub](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-java) | [GitHub](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-php) | [GitHub](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-python) | [GitHub](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-ruby) | [GitHub](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-node) | [GitHub](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-android) | [GitHub](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-swift)|[GitHub](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-dart) |[GitHub](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-go) |
267
+ | [NuGet](https://www.nuget.org/packages/Aspose.Imaging-Cloud/) | [Maven](https://repository.aspose.cloud/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-imaging-cloud) | [Composer](https://packagist.org/packages/aspose/aspose-imaging-cloud) | [PIP](https://pypi.org/project/aspose.imaging-cloud/) | [GEM](https://rubygems.org/gems/aspose_imaging_cloud) | [NPM](https://www.npmjs.com/package/@asposecloud/aspose-imaging-cloud) |[Maven](https://repository.aspose.cloud/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-imaging-cloud)|
268
+
269
+ [Product Page](https://products.aspose.cloud/imaging/ruby) | [Documentation](https://docs.aspose.cloud/display/imagingcloud/Home) | [API Reference](https://apireference.aspose.cloud/imaging/) | [Code Samples](https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-ruby) | [Blog](https://blog.aspose.cloud/category/imaging/) | [Free Support](https://forum.aspose.cloud/c/imaging) | [Free Trial](https://dashboard.aspose.cloud/#/apps)
@@ -32,13 +32,13 @@ module AsposeImagingCloud
32
32
  attr_accessor :api_client
33
33
 
34
34
  # Initializes a new instance of the ImagingApi class.
35
- # @param [String] app_key Key to access the server.
36
- # @param [String] app_sid ID to access the server.
35
+ # @param [String] client_secret Key to access the server.
36
+ # @param [String] client_id ID to access the server.
37
37
  # @param [String] base_url Server URL.
38
38
  # @param [String] api_version Api version.
39
39
  # @param [Object] debug Debug switch [true, false].
40
- def initialize(app_key = nil, app_sid = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v3.0', debug = false)
41
- @api_client = ApiClient.new(app_key, app_sid, base_url, api_version, debug)
40
+ def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v3.0', debug = false)
41
+ @api_client = ApiClient.new(client_secret, client_id, base_url, api_version, debug)
42
42
  end
43
43
 
44
44
  # Add image and images features to search context. Image data may be passed as zero-indexed multipart/form-data content or as raw body stream.
@@ -725,13 +725,8 @@ module AsposeImagingCloud
725
725
  private
726
726
 
727
727
  def make_request(http_request, method, return_type)
728
+ ensure_token
728
729
  call_api(http_request, method, return_type)
729
- rescue ApiError => e
730
- if e.code.equal? 401
731
- request_token
732
- return call_api(http_request, method, return_type)
733
- end
734
- raise
735
730
 
736
731
  end
737
732
 
@@ -747,13 +742,17 @@ module AsposeImagingCloud
747
742
  response[0]
748
743
  end
749
744
 
745
+ def ensure_token
746
+ request_token unless @api_client.config.access_token
747
+ end
748
+
750
749
  def request_token
751
750
  config = @api_client.config
752
751
  request_url = '/connect/token'
753
752
  form_params =
754
753
  {
755
754
  'grant_type': 'client_credentials',
756
- 'client_id': config.api_key[:app_sid],
755
+ 'client_id': config.api_key[:client_id],
757
756
  'client_secret': config.api_key[:api_key]
758
757
  }
759
758
 
@@ -45,16 +45,16 @@ module AsposeImagingCloud
45
45
  attr_accessor :default_headers
46
46
 
47
47
  # Initializes the ApiClient
48
- # @param [String] app_key Key to access the server.
49
- # @param [String] app_sid ID to access the server.
48
+ # @param [String] client_secret Key to access the server.
49
+ # @param [String] client_id ID to access the server.
50
50
  # @param [String] base_url Server URL.
51
51
  # @param [String] api_version Api version.
52
52
  # @param [Object] debug Debug switch [true, false].
53
- def initialize(app_key = nil, app_sid = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v3.0', debug = false)
54
- @config = Configuration.new(app_key, app_sid, base_url, api_version, debug)
53
+ def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v3.0', debug = false)
54
+ @config = Configuration.new(client_secret, client_id, base_url, api_version, debug)
55
55
  @default_headers = {
56
56
  'x-aspose-client' => 'ruby sdk',
57
- 'x-aspose-version' => '20.8'
57
+ 'x-aspose-version' => '21.12'
58
58
  }
59
59
  end
60
60
 
@@ -149,18 +149,18 @@ module AsposeImagingCloud
149
149
  attr_accessor :force_ending_format
150
150
 
151
151
  # Initializes a new instance.
152
- # @param [String] app_key Key to access the server.
153
- # @param [String] app_sid ID to access the server.
152
+ # @param [String] client_secret Key to access the server.
153
+ # @param [String] client_id ID to access the server.
154
154
  # @param [String] base_url Server URL.
155
155
  # @param [String] api_version Api version.
156
156
  # @param [Object] debug Debug switch [true, false].
157
- def initialize(app_key = nil, app_sid = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v3.0', debug = false)
157
+ def initialize(client_secret = nil, client_id = nil, base_url = 'api-qa.aspose.cloud', api_version = 'v3.0', debug = false)
158
158
  @scheme = 'https'
159
159
  self.host = base_url
160
160
  @api_version = api_version
161
161
  self.base_path = @api_version
162
- @api_key = { 'api_key': app_key || '',
163
- 'app_sid': app_sid || '' }
162
+ @api_key = { 'api_key': client_secret || '',
163
+ 'client_id': client_id || '' }
164
164
  @api_key_prefix = {}
165
165
  @timeout = 0
166
166
  @client_side_validation = true
@@ -173,7 +173,7 @@ module AsposeImagingCloud
173
173
  @inject_format = false
174
174
  @force_ending_format = false
175
175
  @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
176
- @on_premise = (!(app_key || app_sid) && base_url)
176
+ @on_premise = (!(client_secret || client_id) && base_url)
177
177
 
178
178
  yield(self) if block_given?
179
179
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aspose_imaging_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: '20.8'
4
+ version: '21.12'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergei Zubov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-28 00:00:00.000000000 Z
11
+ date: 2021-12-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
 
@@ -18,7 +18,8 @@ description: |2
18
18
 
19
19
  This repository contains Aspose.Imaging Cloud Ruby SDK source code. This SDK allows you to work with Aspose.Imaging Cloud REST APIs in your Ruby applications quickly and easily, with zero initial cost.
20
20
 
21
- To use this SDK, you will need App SID and App Key which can be looked up at Aspose Cloud Dashboard (free registration in Aspose Cloud is required for this).
21
+ To use this SDK, you will need Client ID and Client Key which can be looked up at Aspose Cloud Dashboard (free
22
+ registration in Aspose Cloud is required for this).
22
23
 
23
24
  The solution is updated using code generator.
24
25
  email: sergei.zubov@aspose.com
@@ -177,7 +178,7 @@ licenses:
177
178
  - MIT
178
179
  metadata:
179
180
  source_code_uri: https://github.com/aspose-imaging-cloud/aspose-imaging-cloud-ruby
180
- post_install_message:
181
+ post_install_message:
181
182
  rdoc_options: []
182
183
  require_paths:
183
184
  - lib
@@ -192,8 +193,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
193
  - !ruby/object:Gem::Version
193
194
  version: '0'
194
195
  requirements: []
195
- rubygems_version: 3.0.3
196
- signing_key:
196
+ rubygems_version: 3.1.6
197
+ signing_key:
197
198
  specification_version: 4
198
199
  summary: Aspose.Imaging Cloud Ruby SDK
199
200
  test_files: []