Simple API Wrapper for the New BattleNet APIs ( https://dev.battle.net/ )
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib/battlenet
spec
.gitignore
Gemfile
LICENSE.txt
README.md
Rakefile
battlenet-api.gemspec

README.md

Battlenet API Gem

Gem Version Dependency Status Code Climate

Installation

$ gem install battlenet-api

How to Use

Configuration

Battlenet.configure do |config|
  config.api_key = 'apikey'
  config.region  = :us
end

World of Warcraft Client

client = Battlenet.WOWClient

achievement = client.achievement({achievement: 'achievement_id'})
auction_data = client.auction({realm: 'realm_id'})
character = client.character({realm: 'realm_id', character_name: 'character_name'})

# TODO: character methods

guild = client.guild({realm: 'realm', guild_name: 'guild_name'})

# TODO: guild methods

data = client.data

# TODO: data methods

item = data.item({item: 'item_id'})
puts item.details

item = data.item_set({item_set: 'item_set_id'})
puts item.details

pvp_leaderboards = data.pvp_leaderboards({bracket: 'bracket'})
puts pvp_leaderboards.details

quest = data.quest({quest: 'quest_id'})
puts quest.details

recipe = data.recipe({recipe: 'recipe_id'})
puts recipe.details

spell = data.spell({spell: 'spell_id'})
puts spell.details

Diablo 3 Client

client = Battlenet.D3Client

#Available Methods
data = client.data

item = data.item({item: 'item_id'})
follower = data.follower({follower: 'follower_id'})
artisan = data.artisan({artisan: 'artisan_id'})

profile = client.profile({battletag: 'battletag'})
puts profile.career
puts profile.hero(hero_id)

Starcraft 2 Client

client = Battlenet.S2Client

#Available Methods
data = client.data

achievements = data.achievements
rewards = data.rewards

ladder = client.ladder({ladder_id: 'ladder_id'})
puts ladder.details

profile = client.profile({id: 'id', region: 'region', name: 'name'})
puts profile.details
puts profile.ladders
puts profile.match_history

TODO

  • Community OAuth Profile APIs
  • Account APIs