Module: BnetApi::D3

Extended by:
D3
Included in:
D3
Defined in:
lib/bnet_api/d3.rb

Overview

All API methods relating to Diablo III are contained in this module.

Instance Method Summary collapse

Instance Method Details

#artisan_data(artisan) ⇒ Hash

Retrieves the data for the specified artisan.

Parameters:

  • artisan (String)

    The name of the artisan.

Returns:

  • (Hash)

    A hash containing the artisan data.



46
47
48
# File 'lib/bnet_api/d3.rb', line 46

def artisan_data(artisan)
  BnetApi.make_request("/d3/data/artisan/#{artisan}")
end

#career_profile(battletag) ⇒ Hash

Retrieves the career profile for the user with the specified battletag.

Parameters:

  • battletag (String)

    The battletag of the user profile.

Returns:

  • (Hash)

    A hash containing the career profile data.



12
13
14
# File 'lib/bnet_api/d3.rb', line 12

def career_profile(battletag)
  BnetApi.make_request("/d3/profile/#{URI.encode(battletag)}/")
end

#follower_data(follower) ⇒ Hash

Retrieves the data for the specified follower.

Parameters:

  • follower (String)

    The name of the follower.

Returns:

  • (Hash)

    A hash containing the follower data.



38
39
40
# File 'lib/bnet_api/d3.rb', line 38

def follower_data(follower)
  BnetApi.make_request("/d3/data/follower/#{follower}")
end

#hero_profile(battletag, id) ⇒ Hash

Retrieves the hero profile for the hero with the specified ID belonging to the user with the specified battletag.

Parameters:

  • battletag (String)

    The battletag of the user profile.

  • id (Integer)

    The ID of the hero.

Returns:

  • (Hash)

    A hash containing the hero profile data.



22
23
24
# File 'lib/bnet_api/d3.rb', line 22

def hero_profile(battletag, id)
  BnetApi.make_request("/d3/profile/#{URI.encode(battletag)}/hero/#{id}")
end

#item_data(data) ⇒ Hash

Retrieves the data for an item with the specified item data string.

Parameters:

  • data (String)

    The item data string of the item.

Returns:

  • (Hash)

    A hash containing the item data.



30
31
32
# File 'lib/bnet_api/d3.rb', line 30

def item_data(data)
  BnetApi.make_request("/d3/data/item/#{data}")
end