Module: Eve::API::Services::Character

Defined in:
lib/eve/api/services/character.rb

Class Method Summary collapse

Instance Method Summary collapse

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_balanceObject

full API key



19
# File 'lib/eve/api/services/character.rb', line 19

def ; 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_sheetObject

limited API key



6
# File 'lib/eve/api/services/character.rb', line 6

def character_sheet; request(:char, :character_sheet); end

#fac_war_statsObject

limited API key



8
# File 'lib/eve/api/services/character.rb', line 8

def fac_war_stats; request(:char, :fac_war_stats); end

#industry_jobsObject

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(options = {})
  options.reverse_merge!({:walk => false, :walk_id => 'before_kill_id', :walk_association => 'kills' })
  validate_options(options, :walk, :walk_id, :walk_association)
  request(:char, :kill_log, options)
end

#mail_messagesObject

full API key



42
# File 'lib/eve/api/services/character.rb', line 42

def mail_messages; request(:char, :mail_messages); end

#mailing_listsObject

full API key



40
# File 'lib/eve/api/services/character.rb', line 40

def mailing_lists; request(:char, :mailing_lists); end

#market_ordersObject

full API key



44
# File 'lib/eve/api/services/character.rb', line 44

def market_orders; request(:char, :market_orders); end

#medalsObject

limited API key



10
# File 'lib/eve/api/services/character.rb', line 10

def medals; request(:char, :medals); end

#notificationsObject

full API key



46
# File 'lib/eve/api/services/character.rb', line 46

def notifications; request(:char, :notifications); end

#researchObject

full API key



48
# File 'lib/eve/api/services/character.rb', line 48

def research; request(:char, :research); end

#skill_in_trainingObject

limited API key



12
# File 'lib/eve/api/services/character.rb', line 12

def skill_in_training; request(:char, :skill_in_training); end

#skill_queueObject

limited API key



14
# File 'lib/eve/api/services/character.rb', line 14

def skill_queue; request(:char, :skill_queue); end

#standingsObject

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( = 1000, options = { })
  if .kind_of?(Hash)
    options = 
     = 1000
  end
  options.reverse_merge!({:walk => false, :walk_id => 'before_ref_id', :walk_association => 'entries' })
  validate_options(options, :walk, :walk_id, :walk_association)
  request(:char, :wallet_journal, options.merge(: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(options = {})
  options.reverse_merge!({:walk => false, :walk_id => 'before_trans_id', :walk_association => 'transactions' })
  validate_options(options, :walk, :walk_id, :walk_association)
  request(:char, :wallet_transactions, options)
end