Module: Eve::API::Services::Eve
- Defined in:
- lib/eve/api/services/eve.rb
Instance Method Summary collapse
- #alliance_list ⇒ Object
- #certificate_tree ⇒ Object
-
#character_id(*names) ⇒ Object
(also: #character_ids, #corporation_ids, #corporation_id, #alliance_ids, #alliance_id)
Character ID to Name conversion.
-
#character_name(*ids) ⇒ Object
(also: #character_names, #corporation_name, #alliance_name)
Character ID to Name conversion.
- #conquerable_station_list ⇒ Object
- #error_list ⇒ Object
- #fac_war_stats ⇒ Object (also: #factional_warfare_stats)
- #fac_war_top_stats ⇒ Object (also: #factional_warfare_top100)
-
#ref_types ⇒ Object
Returns a list of transaction types used in the Journal Entries Response Example: result = api.eve.ref_types result.ref_types #=> (Rowset) result.ref_types.ref_type_id #=> 0 result.ref_types.ref_type_name #=> “Undefined” result.ref_types.ref_type_id #=> 1 result.ref_types.ref_type_name #=> “Player Trading” .
- #skill_tree ⇒ Object
Instance Method Details
#alliance_list ⇒ Object
5 |
# File 'lib/eve/api/services/eve.rb', line 5 def alliance_list; request(:eve, :alliance_list); end |
#certificate_tree ⇒ Object
6 |
# File 'lib/eve/api/services/eve.rb', line 6 def certificate_tree; request(:eve, :certificate_tree, :column_mapping => { 'level' => 'skillLevel' }); end |
#character_id(*names) ⇒ Object Also known as: character_ids, corporation_ids, corporation_id, alliance_ids, alliance_id
Character ID to Name conversion. Accepts a list of character names, and returns the name for each name in the form of a Hash. Despite the name, it can also accept corporation and alliance names.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/eve/api/services/eve.rb', line 33 def character_id(*names) response = request(:eve, :character_id, :names => names.flatten.join(',')) result = {} [:characters, :corporations, :alliances].each do |field| if response.respond_to?(field) response.send(field).each { |row| result[row.name] = row.character_id } end end result end |
#character_name(*ids) ⇒ Object Also known as: character_names, corporation_name, alliance_name
Character ID to Name conversion. Accepts a list of character IDs, and returns the name for each ID in the form of a Hash. Despite the name, it can also accept corporation and alliance IDs.
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/eve/api/services/eve.rb', line 46 def character_name(*ids) response = request(:eve, :character_name, :ids => ids.flatten.join(',')) result = {} [:characters, :corporations, :alliances].each do |field| if response.respond_to?(field) response.send(field).each { |row| result[row.name] = row.name } end end result end |
#conquerable_station_list ⇒ Object
7 |
# File 'lib/eve/api/services/eve.rb', line 7 def conquerable_station_list; request(:eve, :conquerable_station_list); end |
#error_list ⇒ Object
8 |
# File 'lib/eve/api/services/eve.rb', line 8 def error_list; request(:eve, :error_list); end |
#fac_war_stats ⇒ Object Also known as: factional_warfare_stats
9 |
# File 'lib/eve/api/services/eve.rb', line 9 def fac_war_stats; request(:eve, :fac_war_stats); end |
#fac_war_top_stats ⇒ Object Also known as: factional_warfare_top100
10 |
# File 'lib/eve/api/services/eve.rb', line 10 def fac_war_top_stats; request(:eve, :fac_war_top_stats); end |
#ref_types ⇒ Object
Returns a list of transaction types used in the Journal Entries Response Example:
result = api.eve.ref_types
result.ref_types #=> (Rowset)
result.ref_types[0].ref_type_id #=> 0
result.ref_types[0].ref_type_name #=> "Undefined"
result.ref_types[1].ref_type_id #=> 1
result.ref_types[1].ref_type_name #=> "Player Trading"
. . .
22 23 24 25 26 27 28 29 |
# File 'lib/eve/api/services/eve.rb', line 22 def ref_types response = request(:eve, :ref_types) result = {} response.ref_types.each do |row| result[row.ref_type_id] = row.ref_type_name end result end |
#skill_tree ⇒ Object
11 |
# File 'lib/eve/api/services/eve.rb', line 11 def skill_tree; request(:eve, :skill_tree); end |