battlenet-api 1.0.0 → 1.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.
- checksums.yaml +4 -4
- data/lib/battlenet/api/version.rb +1 -1
- data/lib/battlenet/api/wow_client.rb +15 -0
- data/lib/battlenet/modules/wow/achievement.rb +2 -2
- data/lib/battlenet/modules/wow/auction.rb +2 -2
- data/lib/battlenet/modules/wow/challenge.rb +20 -0
- data/lib/battlenet/modules/wow/character.rb +40 -36
- data/lib/battlenet/modules/wow/data.rb +20 -20
- data/lib/battlenet/modules/wow/guild.rb +10 -10
- data/lib/battlenet/modules/wow/item.rb +2 -2
- data/lib/battlenet/modules/wow/item_set.rb +2 -2
- data/lib/battlenet/modules/wow/mount.rb +16 -0
- data/lib/battlenet/modules/wow/pet.rb +27 -0
- data/lib/battlenet/modules/wow/pvp_leaderboard.rb +2 -2
- data/lib/battlenet/modules/wow/quest.rb +2 -2
- data/lib/battlenet/modules/wow/realm.rb +2 -2
- data/lib/battlenet/modules/wow/recipe.rb +2 -2
- data/lib/battlenet/modules/wow/spell.rb +2 -2
- data/spec/d3/data_spec.rb +0 -11
- data/spec/d3/profile_spec.rb +1 -12
- data/spec/sc2/data_spec.rb +0 -11
- data/spec/sc2/ladder_spec.rb +0 -11
- data/spec/sc2/profile_spec.rb +0 -11
- data/spec/wow/achievement_spec.rb +7 -0
- data/spec/wow/auction_spec.rb +7 -0
- data/spec/wow/challenge_spec.rb +8 -0
- data/spec/wow/data_spec.rb +16 -0
- data/spec/wow/guild_spec.rb +0 -11
- data/spec/wow/item_set_spec.rb +7 -0
- data/spec/wow/item_spec.rb +7 -0
- data/spec/wow/mount_spec.rb +7 -0
- data/spec/wow/pet_spec.rb +10 -0
- data/spec/wow/pvp_leaderboard_spec.rb +7 -0
- data/spec/wow/quest_spec.rb +7 -0
- data/spec/wow/realm_spec.rb +7 -0
- data/spec/wow/recipe_spec.rb +7 -0
- data/spec/wow/spell_spec.rb +7 -0
- data/spec/wowclient_spec.rb +3 -0
- metadata +30 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 83a48f5a460b04ecbf908e0e1c118e44001ddc3d
         | 
| 4 | 
            +
              data.tar.gz: 29891141cbe12178c019d4fcb10607b2c12ccb43
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ca2ebd741b6fd6b0fc59d42819f98b5e0b6e1ff6beaa0c5397a4949f7ac7e4389522528b85e99257b932df4e94ca176149ee440487ad6060554872f4de664c7b
         | 
| 7 | 
            +
              data.tar.gz: 322c788c3ffc3d39b3866f895443842816e93649b67ec8173c1b3cf53caf7530fecd4e7f7efeea60d2c797545a85536c104f1053b59a2acb6084dd85959c4ba4
         | 
| @@ -12,6 +12,9 @@ require 'battlenet/modules/wow/realm' | |
| 12 12 | 
             
            require 'battlenet/modules/wow/recipe'
         | 
| 13 13 | 
             
            require 'battlenet/modules/wow/spell'
         | 
| 14 14 | 
             
            require 'battlenet/modules/wow/data'
         | 
| 15 | 
            +
            require 'battlenet/modules/wow/challenge'
         | 
| 16 | 
            +
            require 'battlenet/modules/wow/mount'
         | 
| 17 | 
            +
            require 'battlenet/modules/wow/pet'
         | 
| 15 18 |  | 
| 16 19 | 
             
            module Battlenet
         | 
| 17 20 |  | 
| @@ -28,6 +31,14 @@ module Battlenet | |
| 28 31 | 
             
                  merge_options_and_return_obj(options, Battlenet::WOW::Character)
         | 
| 29 32 | 
             
                end
         | 
| 30 33 |  | 
| 34 | 
            +
                def mount(options = {})
         | 
| 35 | 
            +
                  merge_options_and_return_obj(options, Battlenet::WOW::Mount)
         | 
| 36 | 
            +
                end
         | 
| 37 | 
            +
             | 
| 38 | 
            +
                def challenge(options = {})
         | 
| 39 | 
            +
                  merge_options_and_return_obj(options, Battlenet::WOW::Challenge)
         | 
| 40 | 
            +
                end
         | 
| 41 | 
            +
             | 
| 31 42 | 
             
                def guild(options = {})
         | 
| 32 43 | 
             
                  merge_options_and_return_obj(options, Battlenet::WOW::Guild)
         | 
| 33 44 | 
             
                end
         | 
| @@ -72,6 +83,10 @@ module Battlenet | |
| 72 83 | 
             
                  merge_options_and_return_obj(options, Battlenet::WOW::Data)
         | 
| 73 84 | 
             
                end
         | 
| 74 85 |  | 
| 86 | 
            +
                def pet(options = {})
         | 
| 87 | 
            +
                  merge_options_and_return_obj(options, Battlenet::WOW::Pet)
         | 
| 88 | 
            +
                end
         | 
| 89 | 
            +
             | 
| 75 90 | 
             
                private
         | 
| 76 91 |  | 
| 77 92 | 
             
                  def merge_options_and_return_obj(options, obj)
         | 
| @@ -0,0 +1,20 @@ | |
| 1 | 
            +
            module Battlenet
         | 
| 2 | 
            +
              module WOW
         | 
| 3 | 
            +
                class Challenge < Battlenet::APIResponse
         | 
| 4 | 
            +
             | 
| 5 | 
            +
                  def initialize(options={})
         | 
| 6 | 
            +
                    @endpoint       = "/challenge"
         | 
| 7 | 
            +
                    super(options)
         | 
| 8 | 
            +
                  end
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                  def realm_leaderboard(realm, options = {})
         | 
| 11 | 
            +
                    get_data("#{@endpoint}/#{realm}", options)
         | 
| 12 | 
            +
                  end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                  def region_leaderboard(options = {})
         | 
| 15 | 
            +
                    get_data("#{@endpoint}/region", options)
         | 
| 16 | 
            +
                  end
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                end
         | 
| 19 | 
            +
              end
         | 
| 20 | 
            +
            end
         | 
| @@ -11,76 +11,80 @@ module Battlenet | |
| 11 11 | 
             
                    super(options)
         | 
| 12 12 | 
             
                  end
         | 
| 13 13 |  | 
| 14 | 
            -
                  def profile
         | 
| 15 | 
            -
                    get_data(@endpoint,  | 
| 14 | 
            +
                  def profile(options = {})
         | 
| 15 | 
            +
                    get_data(@endpoint, options)
         | 
| 16 16 | 
             
                  end
         | 
| 17 17 |  | 
| 18 | 
            -
                  def achievements
         | 
| 19 | 
            -
                    get_data(@endpoint, {: | 
| 18 | 
            +
                  def achievements(options = {})
         | 
| 19 | 
            +
                    get_data(@endpoint, options.merge({fields: 'achievements'}))
         | 
| 20 20 | 
             
                  end
         | 
| 21 21 |  | 
| 22 | 
            -
                  def appearance
         | 
| 23 | 
            -
                    get_data(@endpoint, {: | 
| 22 | 
            +
                  def appearance(options = {})
         | 
| 23 | 
            +
                    get_data(@endpoint, options.merge({fields: 'appearance'}))
         | 
| 24 24 | 
             
                  end
         | 
| 25 25 |  | 
| 26 | 
            -
                  def feed
         | 
| 27 | 
            -
                    get_data(@endpoint, {: | 
| 26 | 
            +
                  def feed(options = {})
         | 
| 27 | 
            +
                    get_data(@endpoint, options.merge({fields: 'feed'}))
         | 
| 28 28 | 
             
                  end
         | 
| 29 29 |  | 
| 30 | 
            -
                  def guild
         | 
| 31 | 
            -
                    get_data(@endpoint, {: | 
| 30 | 
            +
                  def guild(options = {})
         | 
| 31 | 
            +
                    get_data(@endpoint, options.merge({fields: 'guild'}))
         | 
| 32 32 | 
             
                  end
         | 
| 33 33 |  | 
| 34 | 
            -
                  def hunter_pets
         | 
| 35 | 
            -
                    get_data(@endpoint, {: | 
| 34 | 
            +
                  def hunter_pets(options = {})
         | 
| 35 | 
            +
                    get_data(@endpoint, options.merge({fields: 'hunterPets'}))
         | 
| 36 36 | 
             
                  end
         | 
| 37 37 |  | 
| 38 | 
            -
                  def pets
         | 
| 39 | 
            -
                    get_data(@endpoint, {: | 
| 38 | 
            +
                  def pets(options = {})
         | 
| 39 | 
            +
                    get_data(@endpoint, options.merge({fields: 'pets'}))
         | 
| 40 40 | 
             
                  end
         | 
| 41 41 |  | 
| 42 | 
            -
                  def items
         | 
| 43 | 
            -
                    get_data(@endpoint, {: | 
| 42 | 
            +
                  def items(options = {})
         | 
| 43 | 
            +
                    get_data(@endpoint, options.merge({fields: 'items'}))
         | 
| 44 44 | 
             
                  end
         | 
| 45 45 |  | 
| 46 | 
            -
                  def mounts
         | 
| 47 | 
            -
                    get_data(@endpoint, {: | 
| 46 | 
            +
                  def mounts(options = {})
         | 
| 47 | 
            +
                    get_data(@endpoint, options.merge({fields: 'mounts'}))
         | 
| 48 48 | 
             
                  end
         | 
| 49 49 |  | 
| 50 | 
            -
                  def pet_slots
         | 
| 51 | 
            -
                    get_data(@endpoint, {: | 
| 50 | 
            +
                  def pet_slots(options = {})
         | 
| 51 | 
            +
                    get_data(@endpoint, options.merge({fields: 'petSlots'}))
         | 
| 52 52 | 
             
                  end
         | 
| 53 53 |  | 
| 54 | 
            -
                  def progression
         | 
| 55 | 
            -
                    get_data(@endpoint, {: | 
| 54 | 
            +
                  def progression(options = {})
         | 
| 55 | 
            +
                    get_data(@endpoint, options.merge({fields: 'progression'}))
         | 
| 56 56 | 
             
                  end
         | 
| 57 57 |  | 
| 58 | 
            -
                  def pvp
         | 
| 59 | 
            -
                    get_data(@endpoint, {: | 
| 58 | 
            +
                  def pvp(options = {})
         | 
| 59 | 
            +
                    get_data(@endpoint, options.merge({fields: 'pvp'}))
         | 
| 60 60 | 
             
                  end
         | 
| 61 61 |  | 
| 62 | 
            -
                  def quests
         | 
| 63 | 
            -
                    get_data(@endpoint, {: | 
| 62 | 
            +
                  def quests(options = {})
         | 
| 63 | 
            +
                    get_data(@endpoint, options.merge({fields: 'quests'}))
         | 
| 64 64 | 
             
                  end
         | 
| 65 65 |  | 
| 66 | 
            -
                  def reputation
         | 
| 67 | 
            -
                    get_data(@endpoint, {: | 
| 66 | 
            +
                  def reputation(options = {})
         | 
| 67 | 
            +
                    get_data(@endpoint, options.merge({fields: 'reputation'}))
         | 
| 68 68 | 
             
                  end
         | 
| 69 69 |  | 
| 70 | 
            -
                  def  | 
| 71 | 
            -
                    get_data(@endpoint, {: | 
| 70 | 
            +
                  def statistics(options = {})
         | 
| 71 | 
            +
                    get_data(@endpoint, options.merge({fields: 'statistics'}))
         | 
| 72 72 | 
             
                  end
         | 
| 73 73 |  | 
| 74 | 
            -
                  def  | 
| 75 | 
            -
                    get_data(@endpoint, {: | 
| 74 | 
            +
                  def stats(options = {})
         | 
| 75 | 
            +
                    get_data(@endpoint, options.merge({fields: 'stats'}))
         | 
| 76 76 | 
             
                  end
         | 
| 77 77 |  | 
| 78 | 
            -
                  def  | 
| 79 | 
            -
                    get_data(@endpoint, {: | 
| 78 | 
            +
                  def talents(options = {})
         | 
| 79 | 
            +
                    get_data(@endpoint, options.merge({fields: 'talents'}))
         | 
| 80 80 | 
             
                  end
         | 
| 81 81 |  | 
| 82 | 
            -
                  def  | 
| 83 | 
            -
                    get_data(@endpoint, {: | 
| 82 | 
            +
                  def titles(options = {})
         | 
| 83 | 
            +
                    get_data(@endpoint, options.merge({fields: 'titles'}))
         | 
| 84 | 
            +
                  end
         | 
| 85 | 
            +
             | 
| 86 | 
            +
                  def audit(options = {})
         | 
| 87 | 
            +
                    get_data(@endpoint, options.merge({fields: 'audit'}))
         | 
| 84 88 | 
             
                  end
         | 
| 85 89 |  | 
| 86 90 | 
             
                end
         | 
| @@ -6,44 +6,44 @@ module Battlenet | |
| 6 6 | 
             
                    super(options)
         | 
| 7 7 | 
             
                  end
         | 
| 8 8 |  | 
| 9 | 
            -
                  def battlegroups
         | 
| 10 | 
            -
                    get_data("/data/battlegroups",  | 
| 9 | 
            +
                  def battlegroups(options = {})
         | 
| 10 | 
            +
                    get_data("/data/battlegroups", options)
         | 
| 11 11 | 
             
                  end
         | 
| 12 12 |  | 
| 13 | 
            -
                  def character_races
         | 
| 14 | 
            -
                    get_data("/data/character/races",  | 
| 13 | 
            +
                  def character_races(options = {})
         | 
| 14 | 
            +
                    get_data("/data/character/races", options)
         | 
| 15 15 | 
             
                  end
         | 
| 16 16 |  | 
| 17 | 
            -
                  def character_classes
         | 
| 18 | 
            -
                    get_data("/data/character/classes",  | 
| 17 | 
            +
                  def character_classes(options = {})
         | 
| 18 | 
            +
                    get_data("/data/character/classes", options)
         | 
| 19 19 | 
             
                  end
         | 
| 20 20 |  | 
| 21 | 
            -
                  def character_achievements
         | 
| 22 | 
            -
                    get_data("/data/character/achievements",  | 
| 21 | 
            +
                  def character_achievements(options = {})
         | 
| 22 | 
            +
                    get_data("/data/character/achievements", options)
         | 
| 23 23 | 
             
                  end
         | 
| 24 24 |  | 
| 25 | 
            -
                  def guild_rewards
         | 
| 26 | 
            -
                    get_data("/data/guild/rewards",  | 
| 25 | 
            +
                  def guild_rewards(options = {})
         | 
| 26 | 
            +
                    get_data("/data/guild/rewards", options)
         | 
| 27 27 | 
             
                  end
         | 
| 28 28 |  | 
| 29 | 
            -
                  def guild_perks
         | 
| 30 | 
            -
                    get_data("/data/guild/perks",  | 
| 29 | 
            +
                  def guild_perks(options = {})
         | 
| 30 | 
            +
                    get_data("/data/guild/perks", options)
         | 
| 31 31 | 
             
                  end
         | 
| 32 32 |  | 
| 33 | 
            -
                  def guild_achievements
         | 
| 34 | 
            -
                    get_data("/data/guild/achievements",  | 
| 33 | 
            +
                  def guild_achievements(options = {})
         | 
| 34 | 
            +
                    get_data("/data/guild/achievements", options)
         | 
| 35 35 | 
             
                  end
         | 
| 36 36 |  | 
| 37 | 
            -
                  def item_classes
         | 
| 38 | 
            -
                    get_data("/data/item/clases",  | 
| 37 | 
            +
                  def item_classes(options = {})
         | 
| 38 | 
            +
                    get_data("/data/item/clases", options)
         | 
| 39 39 | 
             
                  end
         | 
| 40 40 |  | 
| 41 | 
            -
                  def talents
         | 
| 42 | 
            -
                    get_data("/dava/talents",  | 
| 41 | 
            +
                  def talents(options = {})
         | 
| 42 | 
            +
                    get_data("/dava/talents", options)
         | 
| 43 43 | 
             
                  end
         | 
| 44 44 |  | 
| 45 | 
            -
                  def pet_types
         | 
| 46 | 
            -
                    get_data("/data/pet/types",  | 
| 45 | 
            +
                  def pet_types(options = {})
         | 
| 46 | 
            +
                    get_data("/data/pet/types", options)
         | 
| 47 47 | 
             
                  end
         | 
| 48 48 |  | 
| 49 49 | 
             
                end
         | 
| @@ -11,24 +11,24 @@ module Battlenet | |
| 11 11 | 
             
                    super(options)
         | 
| 12 12 | 
             
                  end
         | 
| 13 13 |  | 
| 14 | 
            -
                  def profile
         | 
| 15 | 
            -
                    get_data(@endpoint,  | 
| 14 | 
            +
                  def profile(options = {})
         | 
| 15 | 
            +
                    get_data(@endpoint, options)
         | 
| 16 16 | 
             
                  end
         | 
| 17 17 |  | 
| 18 | 
            -
                  def members
         | 
| 19 | 
            -
                    get_data(@endpoint, {: | 
| 18 | 
            +
                  def members(options = {})
         | 
| 19 | 
            +
                    get_data(@endpoint, options.merge({fields: 'members'}))
         | 
| 20 20 | 
             
                  end
         | 
| 21 21 |  | 
| 22 | 
            -
                  def achievements
         | 
| 23 | 
            -
                    get_data(@endpoint, {: | 
| 22 | 
            +
                  def achievements(options = {})
         | 
| 23 | 
            +
                    get_data(@endpoint, options.merge({fields: 'achievements'}))
         | 
| 24 24 | 
             
                  end
         | 
| 25 25 |  | 
| 26 | 
            -
                  def news
         | 
| 27 | 
            -
                    get_data(@endpoint, {: | 
| 26 | 
            +
                  def news(options = {})
         | 
| 27 | 
            +
                    get_data(@endpoint, options.merge({fields: 'news'}))
         | 
| 28 28 | 
             
                  end
         | 
| 29 29 |  | 
| 30 | 
            -
                  def challenge
         | 
| 31 | 
            -
                    get_data(@endpoint, {: | 
| 30 | 
            +
                  def challenge(options = {})
         | 
| 31 | 
            +
                    get_data(@endpoint, options.merge({fields: 'challenge'}))
         | 
| 32 32 | 
             
                  end
         | 
| 33 33 | 
             
                end
         | 
| 34 34 | 
             
              end
         | 
| @@ -0,0 +1,27 @@ | |
| 1 | 
            +
            module Battlenet
         | 
| 2 | 
            +
              module WOW
         | 
| 3 | 
            +
                class Pet < Battlenet::APIResponse
         | 
| 4 | 
            +
             | 
| 5 | 
            +
                  def initialize(options={})
         | 
| 6 | 
            +
                    @endpoint       = "/wow/pet"
         | 
| 7 | 
            +
                    super(options)
         | 
| 8 | 
            +
                  end
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                  def master_list(options = {})
         | 
| 11 | 
            +
                    get_data(@endpoint, options)
         | 
| 12 | 
            +
                  end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                  def ability(id, options = {})
         | 
| 15 | 
            +
                    get_data("#{@endpoint}/ability/#{id}", options)
         | 
| 16 | 
            +
                  end
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                  def species(id, options = {})
         | 
| 19 | 
            +
                    get_data("#{@endpoint}/species/#{id}", options)
         | 
| 20 | 
            +
                  end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                  def stats(species_id, options = {})
         | 
| 23 | 
            +
                    get_data("#{@endpoint}/stats/#{species_id}", options)
         | 
| 24 | 
            +
                  end
         | 
| 25 | 
            +
                end
         | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
            end
         | 
    
        data/spec/d3/data_spec.rb
    CHANGED
    
    | @@ -2,17 +2,6 @@ require 'spec_helper' | |
| 2 2 |  | 
| 3 3 | 
             
            describe Battlenet::D3::Data do
         | 
| 4 4 |  | 
| 5 | 
            -
              context "when looking up data" do
         | 
| 6 | 
            -
                before do
         | 
| 7 | 
            -
                  Battlenet.configure do |config|
         | 
| 8 | 
            -
                    config.api_key = ENV['BATTLENET_API_KEY']
         | 
| 9 | 
            -
                    config.region  = :us
         | 
| 10 | 
            -
                  end
         | 
| 11 | 
            -
                  @d3_client = Battlenet.D3Client
         | 
| 12 | 
            -
                end
         | 
| 13 | 
            -
             | 
| 14 | 
            -
              end
         | 
| 15 | 
            -
             | 
| 16 5 | 
             
              it { should respond_to(:item) }
         | 
| 17 6 | 
             
              it { should respond_to(:follower) }
         | 
| 18 7 | 
             
              it { should respond_to(:artisan) }
         | 
    
        data/spec/d3/profile_spec.rb
    CHANGED
    
    | @@ -2,18 +2,7 @@ require 'spec_helper' | |
| 2 2 |  | 
| 3 3 | 
             
            describe Battlenet::D3::Profile do
         | 
| 4 4 |  | 
| 5 | 
            -
              context "when looking up profile" do
         | 
| 6 | 
            -
                before do
         | 
| 7 | 
            -
                  Battlenet.configure do |config|
         | 
| 8 | 
            -
                    config.api_key = ENV['BATTLENET_API_KEY']
         | 
| 9 | 
            -
                    config.region  = :us
         | 
| 10 | 
            -
                  end
         | 
| 11 | 
            -
                  @d3_client = Battlenet.D3Client
         | 
| 12 | 
            -
                end
         | 
| 13 | 
            -
             | 
| 14 | 
            -
              end
         | 
| 15 | 
            -
             | 
| 16 5 | 
             
              it { should respond_to(:career) }
         | 
| 17 6 | 
             
              it { should respond_to(:hero) }
         | 
| 18 | 
            -
             | 
| 7 | 
            +
             | 
| 19 8 | 
             
            end
         | 
    
        data/spec/sc2/data_spec.rb
    CHANGED
    
    | @@ -2,17 +2,6 @@ require 'spec_helper' | |
| 2 2 |  | 
| 3 3 | 
             
            describe Battlenet::SC2::Data do
         | 
| 4 4 |  | 
| 5 | 
            -
              context "when looking up data" do
         | 
| 6 | 
            -
                before do
         | 
| 7 | 
            -
                  Battlenet.configure do |config|
         | 
| 8 | 
            -
                    config.api_key = ENV['BATTLENET_API_KEY']
         | 
| 9 | 
            -
                    config.region  = :us
         | 
| 10 | 
            -
                  end
         | 
| 11 | 
            -
                  @sc2_client = Battlenet.SC2Client
         | 
| 12 | 
            -
                end
         | 
| 13 | 
            -
             | 
| 14 | 
            -
              end
         | 
| 15 | 
            -
             | 
| 16 5 | 
             
              it { should respond_to(:achievements) }
         | 
| 17 6 | 
             
              it { should respond_to(:rewards) }
         | 
| 18 7 |  | 
    
        data/spec/sc2/ladder_spec.rb
    CHANGED
    
    | @@ -2,17 +2,6 @@ require 'spec_helper' | |
| 2 2 |  | 
| 3 3 | 
             
            describe Battlenet::SC2::Ladder do
         | 
| 4 4 |  | 
| 5 | 
            -
              context "when looking up ladder" do
         | 
| 6 | 
            -
                before do
         | 
| 7 | 
            -
                  Battlenet.configure do |config|
         | 
| 8 | 
            -
                    config.api_key = ENV['BATTLENET_API_KEY']
         | 
| 9 | 
            -
                    config.region  = :us
         | 
| 10 | 
            -
                  end
         | 
| 11 | 
            -
                  @sc2_client = Battlenet.SC2Client
         | 
| 12 | 
            -
                end
         | 
| 13 | 
            -
             | 
| 14 | 
            -
              end
         | 
| 15 | 
            -
             | 
| 16 5 | 
             
              it { should respond_to(:details) }
         | 
| 17 6 |  | 
| 18 7 | 
             
            end
         | 
    
        data/spec/sc2/profile_spec.rb
    CHANGED
    
    | @@ -2,17 +2,6 @@ require 'spec_helper' | |
| 2 2 |  | 
| 3 3 | 
             
            describe Battlenet::SC2::Profile do
         | 
| 4 4 |  | 
| 5 | 
            -
              context "when looking up profile" do
         | 
| 6 | 
            -
                before do
         | 
| 7 | 
            -
                  Battlenet.configure do |config|
         | 
| 8 | 
            -
                    config.api_key = ENV['BATTLENET_API_KEY']
         | 
| 9 | 
            -
                    config.region  = :us
         | 
| 10 | 
            -
                  end
         | 
| 11 | 
            -
                  @sc2_client = Battlenet.SC2Client
         | 
| 12 | 
            -
                end
         | 
| 13 | 
            -
             | 
| 14 | 
            -
              end
         | 
| 15 | 
            -
             | 
| 16 5 | 
             
              it { should respond_to(:details) }
         | 
| 17 6 | 
             
              it { should respond_to(:ladders) }
         | 
| 18 7 | 
             
              it { should respond_to(:match_history) }
         | 
| @@ -0,0 +1,16 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe Battlenet::WOW::Data do
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              it { should respond_to(:battlegroups) }
         | 
| 6 | 
            +
              it { should respond_to(:character_races) }
         | 
| 7 | 
            +
              it { should respond_to(:character_classes) }
         | 
| 8 | 
            +
              it { should respond_to(:character_achievements) }
         | 
| 9 | 
            +
              it { should respond_to(:guild_rewards) }
         | 
| 10 | 
            +
              it { should respond_to(:guild_perks) }
         | 
| 11 | 
            +
              it { should respond_to(:guild_achievements) }
         | 
| 12 | 
            +
              it { should respond_to(:item_classes) }
         | 
| 13 | 
            +
              it { should respond_to(:pet_types) }
         | 
| 14 | 
            +
              it { should respond_to(:talents)}
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            end
         | 
    
        data/spec/wow/guild_spec.rb
    CHANGED
    
    | @@ -2,17 +2,6 @@ require 'spec_helper' | |
| 2 2 |  | 
| 3 3 | 
             
            describe Battlenet::WOW::Guild do
         | 
| 4 4 |  | 
| 5 | 
            -
              context "when looking up a guild" do
         | 
| 6 | 
            -
                before do
         | 
| 7 | 
            -
                  Battlenet.configure do |config|
         | 
| 8 | 
            -
                    config.api_key = ENV['BATTLENET_API_KEY']
         | 
| 9 | 
            -
                    config.region  = :us
         | 
| 10 | 
            -
                  end
         | 
| 11 | 
            -
                  @wow_client = Battlenet.WOWClient
         | 
| 12 | 
            -
                end
         | 
| 13 | 
            -
             | 
| 14 | 
            -
              end
         | 
| 15 | 
            -
             | 
| 16 5 | 
             
              it { should respond_to(:profile) }
         | 
| 17 6 | 
             
              it { should respond_to(:achievements) }
         | 
| 18 7 | 
             
              it { should respond_to(:members) }
         | 
    
        data/spec/wowclient_spec.rb
    CHANGED
    
    | @@ -14,6 +14,9 @@ describe Battlenet::WOWClient do | |
| 14 14 | 
             
              end
         | 
| 15 15 |  | 
| 16 16 | 
             
              it { should respond_to(:character) }
         | 
| 17 | 
            +
              it { should respond_to(:mount) }
         | 
| 18 | 
            +
              it { should respond_to(:pet) }
         | 
| 19 | 
            +
              it { should respond_to(:challenge) }
         | 
| 17 20 | 
             
              it { should respond_to(:guild) }
         | 
| 18 21 | 
             
              it { should respond_to(:item) }
         | 
| 19 22 | 
             
              it { should respond_to(:item_set) }
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: battlenet-api
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - goodcodeguy
         | 
| @@ -166,11 +166,14 @@ files: | |
| 166 166 | 
             
            - lib/battlenet/modules/sc2/profile.rb
         | 
| 167 167 | 
             
            - lib/battlenet/modules/wow/achievement.rb
         | 
| 168 168 | 
             
            - lib/battlenet/modules/wow/auction.rb
         | 
| 169 | 
            +
            - lib/battlenet/modules/wow/challenge.rb
         | 
| 169 170 | 
             
            - lib/battlenet/modules/wow/character.rb
         | 
| 170 171 | 
             
            - lib/battlenet/modules/wow/data.rb
         | 
| 171 172 | 
             
            - lib/battlenet/modules/wow/guild.rb
         | 
| 172 173 | 
             
            - lib/battlenet/modules/wow/item.rb
         | 
| 173 174 | 
             
            - lib/battlenet/modules/wow/item_set.rb
         | 
| 175 | 
            +
            - lib/battlenet/modules/wow/mount.rb
         | 
| 176 | 
            +
            - lib/battlenet/modules/wow/pet.rb
         | 
| 174 177 | 
             
            - lib/battlenet/modules/wow/pvp_leaderboard.rb
         | 
| 175 178 | 
             
            - lib/battlenet/modules/wow/quest.rb
         | 
| 176 179 | 
             
            - lib/battlenet/modules/wow/realm.rb
         | 
| @@ -185,8 +188,21 @@ files: | |
| 185 188 | 
             
            - spec/sc2/profile_spec.rb
         | 
| 186 189 | 
             
            - spec/sc2client_spec.rb
         | 
| 187 190 | 
             
            - spec/spec_helper.rb
         | 
| 191 | 
            +
            - spec/wow/achievement_spec.rb
         | 
| 192 | 
            +
            - spec/wow/auction_spec.rb
         | 
| 193 | 
            +
            - spec/wow/challenge_spec.rb
         | 
| 188 194 | 
             
            - spec/wow/character_spec.rb
         | 
| 195 | 
            +
            - spec/wow/data_spec.rb
         | 
| 189 196 | 
             
            - spec/wow/guild_spec.rb
         | 
| 197 | 
            +
            - spec/wow/item_set_spec.rb
         | 
| 198 | 
            +
            - spec/wow/item_spec.rb
         | 
| 199 | 
            +
            - spec/wow/mount_spec.rb
         | 
| 200 | 
            +
            - spec/wow/pet_spec.rb
         | 
| 201 | 
            +
            - spec/wow/pvp_leaderboard_spec.rb
         | 
| 202 | 
            +
            - spec/wow/quest_spec.rb
         | 
| 203 | 
            +
            - spec/wow/realm_spec.rb
         | 
| 204 | 
            +
            - spec/wow/recipe_spec.rb
         | 
| 205 | 
            +
            - spec/wow/spell_spec.rb
         | 
| 190 206 | 
             
            - spec/wowclient_spec.rb
         | 
| 191 207 | 
             
            homepage: https://github.com/goodcodeguy/battlenet-api
         | 
| 192 208 | 
             
            licenses:
         | 
| @@ -222,6 +238,19 @@ test_files: | |
| 222 238 | 
             
            - spec/sc2/profile_spec.rb
         | 
| 223 239 | 
             
            - spec/sc2client_spec.rb
         | 
| 224 240 | 
             
            - spec/spec_helper.rb
         | 
| 241 | 
            +
            - spec/wow/achievement_spec.rb
         | 
| 242 | 
            +
            - spec/wow/auction_spec.rb
         | 
| 243 | 
            +
            - spec/wow/challenge_spec.rb
         | 
| 225 244 | 
             
            - spec/wow/character_spec.rb
         | 
| 245 | 
            +
            - spec/wow/data_spec.rb
         | 
| 226 246 | 
             
            - spec/wow/guild_spec.rb
         | 
| 247 | 
            +
            - spec/wow/item_set_spec.rb
         | 
| 248 | 
            +
            - spec/wow/item_spec.rb
         | 
| 249 | 
            +
            - spec/wow/mount_spec.rb
         | 
| 250 | 
            +
            - spec/wow/pet_spec.rb
         | 
| 251 | 
            +
            - spec/wow/pvp_leaderboard_spec.rb
         | 
| 252 | 
            +
            - spec/wow/quest_spec.rb
         | 
| 253 | 
            +
            - spec/wow/realm_spec.rb
         | 
| 254 | 
            +
            - spec/wow/recipe_spec.rb
         | 
| 255 | 
            +
            - spec/wow/spell_spec.rb
         | 
| 227 256 | 
             
            - spec/wowclient_spec.rb
         |