blizzard_api 0.5.0 → 0.5.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/blizzard_api/version.rb +1 -1
- data/lib/blizzard_api/wow.rb +8 -0
- data/lib/blizzard_api/wow/game_data/modified_crafting.rb +67 -0
- metadata +3 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 81d6f1a66cf34191acfd15d00934934c29003a2f99367ccf7e9644382ebb89b9
         | 
| 4 | 
            +
              data.tar.gz: 1d5a888c2b9505c501389a3e9bc718e6b88f643f23c52d6bceb36c61c8b13fe4
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: fa2270714c47f2b5913f5a28b575e7a91e1b70c81ad34cb898fcb03d7c02e68c13ee02e3c4c95012ad6c7b1ac417fabd72c11072776ea28786319fc87089ff40
         | 
| 7 | 
            +
              data.tar.gz: fd626a5eafa0630bc3003ace854f2adb65f383ac2e84f755f7325e670804aca1cfde9a82edea687ef99e06850a9e6c4b54d0462b45e265bc400c03d57b498e2a
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -1,5 +1,9 @@ | |
| 1 1 | 
             
            Please view this file on the master branch, otherwise it may be outdated
         | 
| 2 2 |  | 
| 3 | 
            +
            **Version 0.5.1**
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            Added new endpoints: https://us.forums.blizzard.com/en/blizzard/t/wow-game-data-api-modified-crafting-support/12727
         | 
| 6 | 
            +
             | 
| 3 7 | 
             
            **Version 0.5.0**
         | 
| 4 8 |  | 
| 5 9 | 
             
            This version brings a lot of internal changes to the way the gem works. While
         | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/lib/blizzard_api/version.rb
    CHANGED
    
    
    
        data/lib/blizzard_api/wow.rb
    CHANGED
    
    | @@ -19,6 +19,7 @@ module BlizzardApi | |
| 19 19 | 
             
                require_relative 'wow/game_data/item'
         | 
| 20 20 | 
             
                require_relative 'wow/game_data/journal'
         | 
| 21 21 | 
             
                require_relative 'wow/game_data/media'
         | 
| 22 | 
            +
                require_relative 'wow/game_data/modified_crafting'
         | 
| 22 23 | 
             
                require_relative 'wow/game_data/mount'
         | 
| 23 24 | 
             
                require_relative 'wow/game_data/mythic_keystone_affix'
         | 
| 24 25 | 
             
                require_relative 'wow/game_data/mythic_keystone'
         | 
| @@ -104,6 +105,13 @@ module BlizzardApi | |
| 104 105 | 
             
                  BlizzardApi::Wow::Media.new(region)
         | 
| 105 106 | 
             
                end
         | 
| 106 107 |  | 
| 108 | 
            +
                ##
         | 
| 109 | 
            +
                # @param region [String] API Region
         | 
| 110 | 
            +
                # @return {ModifiedCrafting}
         | 
| 111 | 
            +
                def self.modified_crafting(region = BlizzardApi.region)
         | 
| 112 | 
            +
                  BlizzardApi::Wow::ModifiedCrafting.new(region)
         | 
| 113 | 
            +
                end
         | 
| 114 | 
            +
             | 
| 107 115 | 
             
                ##
         | 
| 108 116 | 
             
                # @param region [String] API Region
         | 
| 109 117 | 
             
                # @return {Mount}
         | 
| @@ -0,0 +1,67 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module BlizzardApi
         | 
| 4 | 
            +
              module Wow
         | 
| 5 | 
            +
                ##
         | 
| 6 | 
            +
                # This class allows access to World of Warcraft professions
         | 
| 7 | 
            +
                #
         | 
| 8 | 
            +
                # @see https://develop.battle.net/documentation/api-reference/world-of-warcraft-game-data-api
         | 
| 9 | 
            +
                #
         | 
| 10 | 
            +
                # You can get an instance of this class using the default region as follows:
         | 
| 11 | 
            +
                #   api_instance = BlizzardApi::Wow.modified_crafting
         | 
| 12 | 
            +
                class ModifiedCrafting < Wow::GenericDataEndpoint
         | 
| 13 | 
            +
                  def complete
         | 
| 14 | 
            +
                    raise BlizzardApi::ApiException, 'This endpoint does not have a complete method.'
         | 
| 15 | 
            +
                  end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                  ##
         | 
| 18 | 
            +
                  # Fetch modified crafting category index
         | 
| 19 | 
            +
                  #
         | 
| 20 | 
            +
                  # @!macro request_options
         | 
| 21 | 
            +
                  def categories(options = {})
         | 
| 22 | 
            +
                    api_request "#{base_url(:game_data)}/modified-crafting/category/index", default_options.merge(options)
         | 
| 23 | 
            +
                  end
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                  ##
         | 
| 26 | 
            +
                  # Fetch a modified crafting category
         | 
| 27 | 
            +
                  #
         | 
| 28 | 
            +
                  # @param id [Integer] Modified crafting category id
         | 
| 29 | 
            +
                  #
         | 
| 30 | 
            +
                  # @!macro request_options
         | 
| 31 | 
            +
                  #
         | 
| 32 | 
            +
                  # @!macro response
         | 
| 33 | 
            +
                  def category(id, options = {})
         | 
| 34 | 
            +
                    api_request "#{base_url(:game_data)}/modified-crafting/category/#{id}", default_options.merge(options)
         | 
| 35 | 
            +
                  end
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                  ##
         | 
| 38 | 
            +
                  # Fetch modified crafting slot type index
         | 
| 39 | 
            +
                  #
         | 
| 40 | 
            +
                  # @!macro request_options
         | 
| 41 | 
            +
                  def slot_types(options = {})
         | 
| 42 | 
            +
                    api_request "#{base_url(:game_data)}/modified-crafting/reagent-slot-type/index", default_options.merge(options)
         | 
| 43 | 
            +
                  end
         | 
| 44 | 
            +
             | 
| 45 | 
            +
                  ##
         | 
| 46 | 
            +
                  # Fetch a modified crafting slot type
         | 
| 47 | 
            +
                  #
         | 
| 48 | 
            +
                  # @param id [Integer] Modified crafting slot type id
         | 
| 49 | 
            +
                  #
         | 
| 50 | 
            +
                  # @!macro request_options
         | 
| 51 | 
            +
                  #
         | 
| 52 | 
            +
                  # @!macro response
         | 
| 53 | 
            +
                  def slot_type(id, options = {})
         | 
| 54 | 
            +
                    api_request "#{base_url(:game_data)}/modified-crafting/reagent-slot-type/#{id}", default_options.merge(options)
         | 
| 55 | 
            +
                  end
         | 
| 56 | 
            +
             | 
| 57 | 
            +
                  protected
         | 
| 58 | 
            +
             | 
| 59 | 
            +
                  def endpoint_setup
         | 
| 60 | 
            +
                    @endpoint = 'modified-crafting'
         | 
| 61 | 
            +
                    @namespace = :static
         | 
| 62 | 
            +
                    @collection = 'professions'
         | 
| 63 | 
            +
                    @ttl = CACHE_TRIMESTER
         | 
| 64 | 
            +
                  end
         | 
| 65 | 
            +
                end
         | 
| 66 | 
            +
              end
         | 
| 67 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: blizzard_api
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.5. | 
| 4 | 
            +
              version: 0.5.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Francis Schiavo
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020- | 
| 11 | 
            +
            date: 2020-10-24 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: redis
         | 
| @@ -161,6 +161,7 @@ files: | |
| 161 161 | 
             
            - lib/blizzard_api/wow/game_data/item.rb
         | 
| 162 162 | 
             
            - lib/blizzard_api/wow/game_data/journal.rb
         | 
| 163 163 | 
             
            - lib/blizzard_api/wow/game_data/media.rb
         | 
| 164 | 
            +
            - lib/blizzard_api/wow/game_data/modified_crafting.rb
         | 
| 164 165 | 
             
            - lib/blizzard_api/wow/game_data/mount.rb
         | 
| 165 166 | 
             
            - lib/blizzard_api/wow/game_data/mythic_keystone.rb
         | 
| 166 167 | 
             
            - lib/blizzard_api/wow/game_data/mythic_keystone_affix.rb
         |