class Dota::API::Item
Attributes
id[R]
internal_name[R]
name[R]
Public Class Methods
new(id)
click to toggle source
# File lib/dota/api/item.rb, line 8 def initialize(id) @id = id @internal_name = mapping[id][0] @name = mapping[id][1] end
Public Instance Methods
image_url(type = :lg)
click to toggle source
Possible values for type: :lg - 85x64 PNG image :eg - 27x20 PNG image
# File lib/dota/api/item.rb, line 17 def image_url(type = :lg) filename = "#{internal_name.sub(/\Arecipe_/, '')}_#{type}.png" "http://cdn.dota2.com/apps/dota2/images/items/#{filename}" end