aspose_imaging_cloud 20.9 → 20.12
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: 0d6816eba3a25ceba438ca3924b7c310ff12e5f2b2e47c8bc703d3d9257a1c52
         | 
| 4 | 
            +
              data.tar.gz: de86e95f334dc7a041df9ba867f51b5a2230f6e84a0c98320443180e7e13a951
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 454f0f651f9d8b5b4c6988472d2541124a8a2241b5dccb70697fe8a3e41caa059104556b3c130561106c78890eb33b3e77ff04ac804ebaa45e58238f5a0379c0
         | 
| 7 | 
            +
              data.tar.gz: 8accf5c6a46a8e8f215a3b3b6841bc4f44f6ba358b8e608d2d685e0e41b28cf885f26928d8559b9b94deb49b8ed3b6676ecb3dcc1afa7ff8e9568208242d7287
         | 
    
        data/README.md
    CHANGED
    
    
| @@ -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]  | 
| 36 | 
            -
                # @param [String]  | 
| 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( | 
| 41 | 
            -
                  @api_client = ApiClient.new( | 
| 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[: | 
| 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]  | 
| 49 | 
            -
                # @param [String]  | 
| 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( | 
| 54 | 
            -
                  @config = Configuration.new( | 
| 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. | 
| 57 | 
            +
                    'x-aspose-version' => '20.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]  | 
| 153 | 
            -
                # @param [String]  | 
| 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( | 
| 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':  | 
| 163 | 
            -
                               ' | 
| 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 = (!( | 
| 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. | 
| 4 | 
            +
              version: '20.12'
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Sergei Zubov
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020- | 
| 11 | 
            +
            date: 2020-12-29 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  | 
| 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
         |