Module: ArmoryApi::Client::Item
- Included in:
- ArmoryApi::Client
- Defined in:
- lib/armory_api/client/item.rb
Instance Method Summary collapse
-
#item(id) ⇒ Hash
Retrieve an item.
-
#item_set(id, full = false) ⇒ Hash
Retrieve an item set.
Instance Method Details
#item(id) ⇒ Hash
Retrieve an item
9 10 11 |
# File 'lib/armory_api/client/item.rb', line 9 def item(id) get("/api/wow/item/#{id}") end |
#item_set(id, full = false) ⇒ Hash
Retrieve an item set.
If full is set to true ArmoryApi will retrieve each item of the set.
19 20 21 22 23 24 25 |
# File 'lib/armory_api/client/item.rb', line 19 def item_set(id, full=false) res = get("/api/wow/item/set/#{id}") if full res.items.map! {|i| item(i)} end res end |