hubrise_client 2.0.6 → 2.0.9
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 +4 -4
- data/README.md +27 -0
- data/V1_ENDPOINTS.md +13 -0
- data/lib/hubrise_client/v1.rb +8 -0
- data/lib/hubrise_client/version.rb +1 -1
- data/lib/hubrise_client.rb +3 -0
- metadata +6 -62
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 7a0da97b141e59b8eae05bf3640cea1d5a80e9966aeaccbc70583970971d41d7
         | 
| 4 | 
            +
              data.tar.gz: 80efd8375446ec71cfa1e970adec22615c4591487f73d6aeddc7c9cb8ee5bc00
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 045ba72c148dcec59354e36c6c1576ad640b5f1a0a97f0e5aa5c60a526a7cdfc427ba5227426ef5780b4937d3dae180614f2b25d6a1b7e1993b1e970f616504f
         | 
| 7 | 
            +
              data.tar.gz: 456ce565b0e30f1ab6e8c2fc57eef3b37c8de74e41c7df0797b9c221da0505f9276267be586e5f7bed15cf250b58d08600690853da5ca4a441e6bff8ca5e011f
         | 
    
        data/README.md
    CHANGED
    
    | @@ -96,3 +96,30 @@ response.each_page do |page_response| | |
| 96 96 | 
             
                page_response.data
         | 
| 97 97 | 
             
                # => [{ first_name:... }]
         | 
| 98 98 | 
             
            end
         | 
| 99 | 
            +
            ```
         | 
| 100 | 
            +
             | 
| 101 | 
            +
            # Publish changes to this gem
         | 
| 102 | 
            +
             | 
| 103 | 
            +
            1. Make sure all local changes are committed.
         | 
| 104 | 
            +
             | 
| 105 | 
            +
            2. Increase version in `lib/hubrise_client/version.rb`
         | 
| 106 | 
            +
             | 
| 107 | 
            +
            3. Tag the repository:
         | 
| 108 | 
            +
             | 
| 109 | 
            +
            ```bash
         | 
| 110 | 
            +
            VERSION=2.0.9
         | 
| 111 | 
            +
            git add lib/hubrise_client/version.rb
         | 
| 112 | 
            +
            git commit -m "Version $VERSION"
         | 
| 113 | 
            +
            git tag v$VERSION
         | 
| 114 | 
            +
            git push --tags
         | 
| 115 | 
            +
            git push
         | 
| 116 | 
            +
            ```
         | 
| 117 | 
            +
             | 
| 118 | 
            +
            4. Build & publish:
         | 
| 119 | 
            +
             | 
| 120 | 
            +
            ```bash
         | 
| 121 | 
            +
            rm -f hubrise_client-*.gem
         | 
| 122 | 
            +
            gem build hubrise_client
         | 
| 123 | 
            +
            gem push hubrise_client-*.gem
         | 
| 124 | 
            +
            rm -f hubrise_client-*.gem
         | 
| 125 | 
            +
            ``` 
         | 
    
        data/V1_ENDPOINTS.md
    CHANGED
    
    | @@ -296,6 +296,19 @@ client = HubriseClient::V1.new(CLIENT_ID, CLIENT_SECRET, client_attrs) | |
| 296 296 | 
             
              # [POST] /catalogs/zrk6b/images with { headers: { "Content-Type": "image/png" }, body: "bin1" }
         | 
| 297 297 | 
             
              ```
         | 
| 298 298 |  | 
| 299 | 
            +
            ### GET_IMAGES
         | 
| 300 | 
            +
             | 
| 301 | 
            +
            - Initialized with `client_attrs = { access_token: "access_token1" }`
         | 
| 302 | 
            +
              ```ruby
         | 
| 303 | 
            +
              client.get_images("wy3xz")
         | 
| 304 | 
            +
              # [GET] /catalogs/wy3xz/images with { headers: { "X-Access-Token": "access_token1" }}
         | 
| 305 | 
            +
              ```
         | 
| 306 | 
            +
            - Initialized with `client_attrs = { access_token: "access_token1", catalog_id: "zrk6b" }`
         | 
| 307 | 
            +
              ```ruby
         | 
| 308 | 
            +
              client.get_images
         | 
| 309 | 
            +
              # [GET] /catalogs/zrk6b/images with { headers: { "X-Access-Token": "access_token1" }}
         | 
| 310 | 
            +
              ```
         | 
| 311 | 
            +
             | 
| 299 312 | 
             
            ### GET_IMAGE
         | 
| 300 313 |  | 
| 301 314 | 
             
            - Initialized with `client_attrs = { access_token: "access_token1" }`
         | 
    
        data/lib/hubrise_client/v1.rb
    CHANGED
    
    | @@ -37,6 +37,10 @@ module HubriseClient | |
| 37 37 | 
             
                  end
         | 
| 38 38 | 
             
                end
         | 
| 39 39 |  | 
| 40 | 
            +
                def update_location(location_id, params)
         | 
| 41 | 
            +
                  call_api("/locations/#{location_id}", :patch, data: params)
         | 
| 42 | 
            +
                end
         | 
| 43 | 
            +
             | 
| 40 44 | 
             
                # --------------------
         | 
| 41 45 | 
             
                # Orders
         | 
| 42 46 | 
             
                # --------------------
         | 
| @@ -156,6 +160,10 @@ module HubriseClient | |
| 156 160 | 
             
                                                                                         json: false)
         | 
| 157 161 | 
             
                end
         | 
| 158 162 |  | 
| 163 | 
            +
                def get_images(catalog_id = nil)
         | 
| 164 | 
            +
                  call_api("/catalogs/#{catalog_id_fallback(catalog_id)}/images")
         | 
| 165 | 
            +
                end
         | 
| 166 | 
            +
             | 
| 159 167 | 
             
                def get_image(image_id, catalog_id = nil)
         | 
| 160 168 | 
             
                  call_api("/catalogs/#{catalog_id_fallback(catalog_id)}/images/#{image_id}")
         | 
| 161 169 | 
             
                end
         | 
    
        data/lib/hubrise_client.rb
    CHANGED
    
    | @@ -11,7 +11,10 @@ require_relative "hubrise_client/v1" | |
| 11 11 |  | 
| 12 12 | 
             
            module HubriseClient
         | 
| 13 13 | 
             
              class HubriseError              < StandardError; end
         | 
| 14 | 
            +
             | 
| 14 15 | 
             
              class HubriseAccessTokenMissing < HubriseError; end
         | 
| 16 | 
            +
             | 
| 15 17 | 
             
              class InvalidHubriseGrantParams < HubriseError; end
         | 
| 18 | 
            +
             | 
| 16 19 | 
             
              class InvalidHubriseToken       < HubriseError; end
         | 
| 17 20 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: hubrise_client
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.0. | 
| 4 | 
            +
              version: 2.0.9
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Antoine Monnier
         | 
| @@ -9,64 +9,8 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date:  | 
| 13 | 
            -
            dependencies:
         | 
| 14 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 15 | 
            -
              name: rspec
         | 
| 16 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 17 | 
            -
                requirements:
         | 
| 18 | 
            -
                - - ">="
         | 
| 19 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 20 | 
            -
                    version: '0'
         | 
| 21 | 
            -
              type: :development
         | 
| 22 | 
            -
              prerelease: false
         | 
| 23 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 24 | 
            -
                requirements:
         | 
| 25 | 
            -
                - - ">="
         | 
| 26 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 27 | 
            -
                    version: '0'
         | 
| 28 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 29 | 
            -
              name: rubocop
         | 
| 30 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 31 | 
            -
                requirements:
         | 
| 32 | 
            -
                - - ">="
         | 
| 33 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 34 | 
            -
                    version: '0'
         | 
| 35 | 
            -
              type: :development
         | 
| 36 | 
            -
              prerelease: false
         | 
| 37 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 38 | 
            -
                requirements:
         | 
| 39 | 
            -
                - - ">="
         | 
| 40 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 41 | 
            -
                    version: '0'
         | 
| 42 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 43 | 
            -
              name: simplecov
         | 
| 44 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 45 | 
            -
                requirements:
         | 
| 46 | 
            -
                - - ">="
         | 
| 47 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 48 | 
            -
                    version: '0'
         | 
| 49 | 
            -
              type: :development
         | 
| 50 | 
            -
              prerelease: false
         | 
| 51 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 52 | 
            -
                requirements:
         | 
| 53 | 
            -
                - - ">="
         | 
| 54 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 55 | 
            -
                    version: '0'
         | 
| 56 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 57 | 
            -
              name: webmock
         | 
| 58 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 59 | 
            -
                requirements:
         | 
| 60 | 
            -
                - - ">="
         | 
| 61 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 62 | 
            -
                    version: '0'
         | 
| 63 | 
            -
              type: :development
         | 
| 64 | 
            -
              prerelease: false
         | 
| 65 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 66 | 
            -
                requirements:
         | 
| 67 | 
            -
                - - ">="
         | 
| 68 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 69 | 
            -
                    version: '0'
         | 
| 12 | 
            +
            date: 2024-04-04 00:00:00.000000000 Z
         | 
| 13 | 
            +
            dependencies: []
         | 
| 70 14 | 
             
            description: 
         | 
| 71 15 | 
             
            email: 
         | 
| 72 16 | 
             
            executables: []
         | 
| @@ -93,16 +37,16 @@ require_paths: | |
| 93 37 | 
             
            - lib
         | 
| 94 38 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 95 39 | 
             
              requirements:
         | 
| 96 | 
            -
              - - " | 
| 40 | 
            +
              - - "~>"
         | 
| 97 41 | 
             
                - !ruby/object:Gem::Version
         | 
| 98 | 
            -
                  version:  | 
| 42 | 
            +
                  version: 2.7.7
         | 
| 99 43 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 100 44 | 
             
              requirements:
         | 
| 101 45 | 
             
              - - ">="
         | 
| 102 46 | 
             
                - !ruby/object:Gem::Version
         | 
| 103 47 | 
             
                  version: '0'
         | 
| 104 48 | 
             
            requirements: []
         | 
| 105 | 
            -
            rubygems_version: 3.1. | 
| 49 | 
            +
            rubygems_version: 3.1.6
         | 
| 106 50 | 
             
            signing_key: 
         | 
| 107 51 | 
             
            specification_version: 4
         | 
| 108 52 | 
             
            summary: HubRise Ruby client
         |