Class: Greeve::Character::Locations
- Defined in:
- lib/greeve/character/locations.rb
Overview
Location and name of specific items that belong to the character of the api key. This call can be used to retrieve the player-set name of containers and ships.
Instance Method Summary collapse
-
#initialize(character_id, opts = {}) ⇒ Locations
constructor
A new instance of Locations.
Methods inherited from BaseItem
attribute, #cache_expired?, #cached_until, endpoint, #inspect, namespace, #refresh, rowset, #to_s
Methods included from Helpers::AttributeToHash
Constructor Details
#initialize(character_id, opts = {}) ⇒ Locations
Returns a new instance of Locations.
25 26 27 28 29 30 31 32 33 |
# File 'lib/greeve/character/locations.rb', line 25 def initialize(character_id, opts = {}) ids = opts.delete(:ids) ids = [ids] unless ids.nil? || ids.is_a?(Array) opts[:query_params] = { "characterID" => character_id } opts[:query_params]["IDs"] = ids.join(",") if ids super(opts) end |