Module: Eve::API::Services::Character
- Defined in:
- lib/eve/api/services/character.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#account_balance ⇒ Object
full API key.
-
#asset_list(version = nil) ⇒ Object
full API key.
-
#character_sheet ⇒ Object
limited API key.
-
#fac_war_stats ⇒ Object
limited API key.
-
#industry_jobs ⇒ Object
full API key.
-
#kill_log(options = {}) ⇒ Object
This API call only returns 1000 entries.
-
#mail_messages ⇒ Object
full API key.
-
#mailing_lists ⇒ Object
full API key.
-
#market_orders ⇒ Object
full API key.
-
#medals ⇒ Object
limited API key.
-
#notifications ⇒ Object
full API key.
-
#research ⇒ Object
full API key.
-
#skill_in_training ⇒ Object
limited API key.
-
#skill_queue ⇒ Object
limited API key.
-
#standings ⇒ Object
limited API key.
-
#wallet_journal(account_key = 1000, options = { }) ⇒ Object
(also: #journal_entries)
This API call only returns 1000 entries.
-
#wallet_transactions(options = {}) ⇒ Object
This API call only returns 1000 entries.
Class Method Details
.included(base) ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/eve/api/services/character.rb', line 82 def self.included(base) base.instance_eval do validate_credentials :limited, :character_id, :for => %w(character_sheet fac_war_stats medals skill_in_training skill_queue standings ) validate_credentials :full, :character_id, :for => %w(account_balance asset_list industry_jobs kill_log mailing_lists mail_messages market_orders notifications research wallet_journal wallet_transactions journal_entries) end end |
Instance Method Details
#account_balance ⇒ Object
full API key
19 |
# File 'lib/eve/api/services/character.rb', line 19 def account_balance; request(:char, :account_balance); end |
#asset_list(version = nil) ⇒ Object
full API key
21 22 23 |
# File 'lib/eve/api/services/character.rb', line 21 def asset_list(version = nil) request(:char, :asset_list, {:version => version}.optionalize) end |
#character_sheet ⇒ Object
limited API key
6 |
# File 'lib/eve/api/services/character.rb', line 6 def character_sheet; request(:char, :character_sheet); end |
#fac_war_stats ⇒ Object
limited API key
8 |
# File 'lib/eve/api/services/character.rb', line 8 def fac_war_stats; request(:char, :fac_war_stats); end |
#industry_jobs ⇒ Object
full API key
25 |
# File 'lib/eve/api/services/character.rb', line 25 def industry_jobs; request(:char, :industry_jobs); end |
#kill_log(options = {}) ⇒ Object
This API call only returns 1000 entries. Often, you will need to gather all entries, and not just the most recent 1000. If this is true for your application, simply pass the :walk option and this EVE library will automatically “walk” backward in time until the server reports that there are no more entries available.
Walking is disabled by default, so you need to pass the :walk => true option if you wish to enable this.
full API key
34 35 36 37 38 |
# File 'lib/eve/api/services/character.rb', line 34 def kill_log( = {}) .reverse_merge!({:walk => false, :walk_id => 'before_kill_id', :walk_association => 'kills' }) (, :walk, :walk_id, :walk_association) request(:char, :kill_log, ) end |
#mail_messages ⇒ Object
full API key
42 |
# File 'lib/eve/api/services/character.rb', line 42 def ; request(:char, :mail_messages); end |
#mailing_lists ⇒ Object
full API key
40 |
# File 'lib/eve/api/services/character.rb', line 40 def mailing_lists; request(:char, :mailing_lists); end |
#market_orders ⇒ Object
full API key
44 |
# File 'lib/eve/api/services/character.rb', line 44 def market_orders; request(:char, :market_orders); end |
#medals ⇒ Object
limited API key
10 |
# File 'lib/eve/api/services/character.rb', line 10 def medals; request(:char, :medals); end |
#notifications ⇒ Object
full API key
46 |
# File 'lib/eve/api/services/character.rb', line 46 def notifications; request(:char, :notifications); end |
#research ⇒ Object
full API key
48 |
# File 'lib/eve/api/services/character.rb', line 48 def research; request(:char, :research); end |
#skill_in_training ⇒ Object
limited API key
12 |
# File 'lib/eve/api/services/character.rb', line 12 def skill_in_training; request(:char, :skill_in_training); end |
#skill_queue ⇒ Object
limited API key
14 |
# File 'lib/eve/api/services/character.rb', line 14 def skill_queue; request(:char, :skill_queue); end |
#standings ⇒ Object
limited API key
16 |
# File 'lib/eve/api/services/character.rb', line 16 def standings; request(:char, :standings); end |
#wallet_journal(account_key = 1000, options = { }) ⇒ Object Also known as: journal_entries
This API call only returns 1000 entries. Often, you will need to gather all entries, and not just the most recent 1000. If this is true for your application, simply pass the :walk option and this EVE library will automatically “walk” backward in time until the server reports that there are no more entries available.
Walking is disabled by default, so you need to pass the :walk => true option if you wish to enable this.
full API key
57 58 59 60 61 62 63 64 65 |
# File 'lib/eve/api/services/character.rb', line 57 def wallet_journal(account_key = 1000, = { }) if account_key.kind_of?(Hash) = account_key account_key = 1000 end .reverse_merge!({:walk => false, :walk_id => 'before_ref_id', :walk_association => 'entries' }) (, :walk, :walk_id, :walk_association) request(:char, :wallet_journal, .merge(:account_key => account_key)) end |
#wallet_transactions(options = {}) ⇒ Object
This API call only returns 1000 entries. Often, you will need to gather all entries, and not just the most recent 1000. If this is true for your application, simply pass the :walk option and this EVE library will automatically “walk” backward in time until the server reports that there are no more entries available.
Walking is disabled by default, so you need to pass the :walk => true option if you wish to enable this.
full API key
74 75 76 77 78 |
# File 'lib/eve/api/services/character.rb', line 74 def wallet_transactions( = {}) .reverse_merge!({:walk => false, :walk_id => 'before_trans_id', :walk_association => 'transactions' }) (, :walk, :walk_id, :walk_association) request(:char, :wallet_transactions, ) end |