eve 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. data/History.txt +4 -0
  2. data/Manifest.txt +174 -0
  3. data/PostInstall.txt +6 -0
  4. data/README.rdoc +126 -0
  5. data/Rakefile +128 -0
  6. data/features/support/env.rb +1 -0
  7. data/lib/eve.rb +31 -0
  8. data/lib/eve/api.rb +247 -0
  9. data/lib/eve/api/connectivity.rb +39 -0
  10. data/lib/eve/api/request.rb +74 -0
  11. data/lib/eve/api/response.rb +100 -0
  12. data/lib/eve/api/response/inspection.rb +62 -0
  13. data/lib/eve/api/response/rowset.rb +56 -0
  14. data/lib/eve/api/response/rowsets.rb +42 -0
  15. data/lib/eve/api/response/wrap_object.rb +15 -0
  16. data/lib/eve/api/services.rb +20 -0
  17. data/lib/eve/api/services/account.rb +12 -0
  18. data/lib/eve/api/services/character.rb +96 -0
  19. data/lib/eve/api/services/corporation.rb +150 -0
  20. data/lib/eve/api/services/eve.rb +76 -0
  21. data/lib/eve/api/services/map.rb +45 -0
  22. data/lib/eve/api/services/misc.rb +24 -0
  23. data/lib/eve/api/services/server.rb +20 -0
  24. data/lib/eve/core_extensions.rb +3 -0
  25. data/lib/eve/core_extensions/hash.rb +51 -0
  26. data/lib/eve/core_extensions/string.rb +11 -0
  27. data/lib/eve/dependencies.rb +18 -0
  28. data/lib/eve/errors.rb +129 -0
  29. data/lib/eve/errors/authentication_errors.rb +33 -0
  30. data/lib/eve/errors/internal_errors.rb +64 -0
  31. data/lib/eve/errors/miscellaneous_errors.rb +19 -0
  32. data/lib/eve/errors/user_input_errors.rb +62 -0
  33. data/lib/eve/helpers.rb +12 -0
  34. data/lib/eve/helpers/javascript_helper.rb +198 -0
  35. data/lib/eve/helpers/view_helper.rb +13 -0
  36. data/lib/eve/trust.rb +88 -0
  37. data/lib/eve/trust/controller_helpers.rb +90 -0
  38. data/lib/eve/trust/igb_interface.rb +88 -0
  39. data/lib/eve/trust/mime_types.rb +4 -0
  40. data/script/console +10 -0
  41. data/script/console.cmd +1 -0
  42. data/script/destroy +14 -0
  43. data/script/destroy.cmd +1 -0
  44. data/script/generate +14 -0
  45. data/script/generate.cmd +1 -0
  46. data/spec/lib/eve/api/calls/account/characters_spec.rb +22 -0
  47. data/spec/lib/eve/api/calls/character/account_balance_spec.rb +21 -0
  48. data/spec/lib/eve/api/calls/character/asset_list_spec.rb +23 -0
  49. data/spec/lib/eve/api/calls/character/character_sheet_spec.rb +51 -0
  50. data/spec/lib/eve/api/calls/character/fac_war_stats_spec.rb +31 -0
  51. data/spec/lib/eve/api/calls/character/industry_jobs_spec.rb +27 -0
  52. data/spec/lib/eve/api/calls/character/kill_log_spec.rb +27 -0
  53. data/spec/lib/eve/api/calls/character/mail_messages_spec.rb +21 -0
  54. data/spec/lib/eve/api/calls/character/mailing_lists_spec.rb +21 -0
  55. data/spec/lib/eve/api/calls/character/market_orders_spec.rb +21 -0
  56. data/spec/lib/eve/api/calls/character/medals_spec.rb +24 -0
  57. data/spec/lib/eve/api/calls/character/research_spec.rb +21 -0
  58. data/spec/lib/eve/api/calls/character/skill_in_training_spec.rb +44 -0
  59. data/spec/lib/eve/api/calls/character/skill_queue_spec.rb +21 -0
  60. data/spec/lib/eve/api/calls/character/standings_spec.rb +26 -0
  61. data/spec/lib/eve/api/calls/character/wallet_journal_spec.rb +21 -0
  62. data/spec/lib/eve/api/calls/character/wallet_transactions_spec.rb +21 -0
  63. data/spec/lib/eve/api/calls/character_portrait_spec.rb +17 -0
  64. data/spec/lib/eve/api/calls/corporation/account_balances_spec.rb +21 -0
  65. data/spec/lib/eve/api/calls/corporation/asset_list_spec.rb +25 -0
  66. data/spec/lib/eve/api/calls/corporation/container_log_spec.rb +23 -0
  67. data/spec/lib/eve/api/calls/corporation/corporation_sheet_spec.rb +36 -0
  68. data/spec/lib/eve/api/calls/corporation/fac_war_stats_spec.rb +23 -0
  69. data/spec/lib/eve/api/calls/corporation/industry_jobs_spec.rb +30 -0
  70. data/spec/lib/eve/api/calls/corporation/kill_log_spec.rb +27 -0
  71. data/spec/lib/eve/api/calls/corporation/market_orders_spec.rb +22 -0
  72. data/spec/lib/eve/api/calls/corporation/medals_spec.rb +21 -0
  73. data/spec/lib/eve/api/calls/corporation/member_medals_spec.rb +21 -0
  74. data/spec/lib/eve/api/calls/corporation/member_security_log_spec.rb +24 -0
  75. data/spec/lib/eve/api/calls/corporation/member_security_spec.rb +25 -0
  76. data/spec/lib/eve/api/calls/corporation/member_tracking_spec.rb +22 -0
  77. data/spec/lib/eve/api/calls/corporation/shareholders_spec.rb +23 -0
  78. data/spec/lib/eve/api/calls/corporation/standings_spec.rb +30 -0
  79. data/spec/lib/eve/api/calls/corporation/starbase_detail_spec.rb +32 -0
  80. data/spec/lib/eve/api/calls/corporation/starbase_list_spec.rb +22 -0
  81. data/spec/lib/eve/api/calls/corporation/titles_spec.rb +26 -0
  82. data/spec/lib/eve/api/calls/corporation/wallet_journal_spec.rb +22 -0
  83. data/spec/lib/eve/api/calls/corporation/wallet_transactions_spec.rb +22 -0
  84. data/spec/lib/eve/api/calls/empty_call_spec.rb +29 -0
  85. data/spec/lib/eve/api/calls/eve/alliance_list_spec.rb +26 -0
  86. data/spec/lib/eve/api/calls/eve/certificate_tree_spec.rb +18 -0
  87. data/spec/lib/eve/api/calls/eve/character_id_spec.rb +27 -0
  88. data/spec/lib/eve/api/calls/eve/conquerable_station_list_spec.rb +11 -0
  89. data/spec/lib/eve/api/calls/eve/error_list_spec.rb +21 -0
  90. data/spec/lib/eve/api/calls/eve/fac_war_stats_spec.rb +25 -0
  91. data/spec/lib/eve/api/calls/eve/fac_war_top_stats_spec.rb +54 -0
  92. data/spec/lib/eve/api/calls/eve/ref_types_spec.rb +11 -0
  93. data/spec/lib/eve/api/calls/eve/skill_tree_spec.rb +17 -0
  94. data/spec/lib/eve/api/calls/map/fac_war_systems_spec.rb +11 -0
  95. data/spec/lib/eve/api/calls/map/jumps_spec.rb +11 -0
  96. data/spec/lib/eve/api/calls/map/kills_spec.rb +15 -0
  97. data/spec/lib/eve/api/calls/map/sovereignty_spec.rb +11 -0
  98. data/spec/lib/eve/api/calls/server_status_spec.rb +24 -0
  99. data/spec/lib/eve/api/request_spec.rb +17 -0
  100. data/spec/lib/eve/api/response/error_spec.rb +13 -0
  101. data/spec/lib/eve/api/response/rowset_spec.rb +28 -0
  102. data/spec/lib/eve/api/response_spec.rb +79 -0
  103. data/spec/lib/eve/api_spec.rb +13 -0
  104. data/spec/lib/eve/core_extensions/hash_spec.rb +23 -0
  105. data/spec/lib/eve/core_extensions/string_spec.rb +8 -0
  106. data/spec/lib/eve/helpers/javascript_helper_spec.rb +80 -0
  107. data/spec/lib/eve/helpers/view_helper_spec.rb +12 -0
  108. data/spec/lib/eve/trust/controller_helpers_spec.rb +70 -0
  109. data/spec/lib/eve/trust/igb_interface_spec.rb +102 -0
  110. data/spec/rcov.opts +2 -0
  111. data/spec/readme_spec.rb +36 -0
  112. data/spec/sample_api_key.yml +20 -0
  113. data/spec/spec.opts +4 -0
  114. data/spec/spec_helper.rb +22 -0
  115. data/spec/support/behaves_like_rowset.rb +50 -0
  116. data/spec/support/controllers/trust_controller.rb +7 -0
  117. data/spec/support/jpg/mock_portrait.jpg +0 -0
  118. data/spec/support/mock_api_helpers.rb +41 -0
  119. data/spec/support/xml/account/characters.xml +15 -0
  120. data/spec/support/xml/character/account_balance.xml +10 -0
  121. data/spec/support/xml/character/asset_list.xml +50 -0
  122. data/spec/support/xml/character/character_sheet.xml +65 -0
  123. data/spec/support/xml/character/fac_war_stats.xml +20 -0
  124. data/spec/support/xml/character/industry_jobs.xml +70 -0
  125. data/spec/support/xml/character/kill_log.xml +51 -0
  126. data/spec/support/xml/character/mail_messages.xml +12 -0
  127. data/spec/support/xml/character/mailing_lists.xml +12 -0
  128. data/spec/support/xml/character/market_orders.xml +11 -0
  129. data/spec/support/xml/character/medals.xml +13 -0
  130. data/spec/support/xml/character/research.xml +13 -0
  131. data/spec/support/xml/character/skill_in_training.xml +14 -0
  132. data/spec/support/xml/character/skill_not_in_training.xml +7 -0
  133. data/spec/support/xml/character/skill_queue.xml +11 -0
  134. data/spec/support/xml/character/standings.xml +32 -0
  135. data/spec/support/xml/character/wallet_journal.xml +39 -0
  136. data/spec/support/xml/character/wallet_transactions.xml +44 -0
  137. data/spec/support/xml/corporation/account_balance.xml +15 -0
  138. data/spec/support/xml/corporation/asset_list.xml +50 -0
  139. data/spec/support/xml/corporation/container_log.xml +32 -0
  140. data/spec/support/xml/corporation/fac_war_stats.xml +19 -0
  141. data/spec/support/xml/corporation/industry_jobs.xml +70 -0
  142. data/spec/support/xml/corporation/kill_log.xml +51 -0
  143. data/spec/support/xml/corporation/market_orders.xml +37 -0
  144. data/spec/support/xml/corporation/medals.xml +8 -0
  145. data/spec/support/xml/corporation/member_corporation_sheet.xml +51 -0
  146. data/spec/support/xml/corporation/member_medals.xml +10 -0
  147. data/spec/support/xml/corporation/member_security.xml +21 -0
  148. data/spec/support/xml/corporation/member_security_log.xml +55 -0
  149. data/spec/support/xml/corporation/member_tracking.xml +18 -0
  150. data/spec/support/xml/corporation/non_member_corporation_sheet.xml +30 -0
  151. data/spec/support/xml/corporation/shareholders.xml +11 -0
  152. data/spec/support/xml/corporation/standings.xml +33 -0
  153. data/spec/support/xml/corporation/starbase_detail.xml +33 -0
  154. data/spec/support/xml/corporation/starbase_list.xml +17 -0
  155. data/spec/support/xml/corporation/titles.xml +34 -0
  156. data/spec/support/xml/corporation/wallet_journal.xml +40 -0
  157. data/spec/support/xml/corporation/wallet_transactions.xml +12 -0
  158. data/spec/support/xml/errors/106.xml +5 -0
  159. data/spec/support/xml/errors/516.xml +5 -0
  160. data/spec/support/xml/eve/alliance_list.xml +22 -0
  161. data/spec/support/xml/eve/certificate_tree.xml +49 -0
  162. data/spec/support/xml/eve/character_id.xml +15 -0
  163. data/spec/support/xml/eve/conquerable_station_list.xml +24 -0
  164. data/spec/support/xml/eve/error_list.xml +78 -0
  165. data/spec/support/xml/eve/fac_war_stats.xml +31 -0
  166. data/spec/support/xml/eve/fac_war_top_stats.xml +238 -0
  167. data/spec/support/xml/eve/ref_types.xml +105 -0
  168. data/spec/support/xml/eve/skill_tree.xml +52 -0
  169. data/spec/support/xml/map/fac_war_systems.xml +180 -0
  170. data/spec/support/xml/map/jumps.xml +166 -0
  171. data/spec/support/xml/map/kills.xml +191 -0
  172. data/spec/support/xml/map/sovereignty.xml +20 -0
  173. data/spec/support/xml/rowset_with_mismatched_attributes.xml +6 -0
  174. data/spec/support/xml/server/server_status.xml +9 -0
  175. metadata +364 -0
@@ -0,0 +1,62 @@
1
+ module Eve
2
+ class API
3
+ class Response
4
+ module Inspection
5
+ def protected_instance_variables
6
+ (respond_to?(:content) && !content.blank? ? [] : ["@content"]) +
7
+ #(respond_to?(:rowsets) && !rowsets.empty? ? rowsets.collect { |r| "@#{r.name}" } : []) +
8
+ %w(@rowsets @options @xml @columns @row @name)
9
+ end
10
+
11
+ def inspected_name
12
+ respond_to?(:name) ? self.name : "(Response)"
13
+ end
14
+
15
+ def inspected_rowsets
16
+ return nil unless respond_to?(:rowsets) && !rowsets.empty?
17
+ "[#{rowsets.collect { |r| r.inspect }.join(", ")}]"
18
+ end
19
+
20
+ def inspected_elements
21
+ return nil unless respond_to?(:empty?) && !empty?
22
+ "[#{self.collect { |i| i.inspect }.join(", ")}]"
23
+ end
24
+
25
+ def inspected_instance_variables
26
+ return nil if (ivars = instance_variables - protected_instance_variables).empty?
27
+
28
+ ivars.sort! do |a, b|
29
+ original = a <=> b
30
+ a = instance_variable_get(a)
31
+ b = instance_variable_get(b)
32
+ a_rowset = a.kind_of?(Rowset)
33
+ b_rowset = b.kind_of?(Rowset)
34
+
35
+ if a_rowset && b_rowset then a.name <=> b.name
36
+ elsif a_rowset && !b_rowset then 1
37
+ elsif !a_rowset && b_rowset then -1
38
+ else original
39
+ end
40
+ end
41
+
42
+ "#{ivars.map do |ivar|
43
+ v = instance_variable_get(ivar)
44
+ if v.kind_of?(Rowset)
45
+ v.inspect
46
+ else
47
+ "#{ivar[1..-1]}=>#{instance_variable_get(ivar).inspect}"
48
+ end
49
+ end.join(" ")}"
50
+ end
51
+
52
+ def inspect
53
+ r = "#<#{inspected_name}"
54
+ r.concat " #{inspected_instance_variables}" if !inspected_instance_variables.nil?
55
+ r.concat ">"
56
+ r.concat "#{inspected_elements}" if !inspected_elements.nil?
57
+ return r
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,56 @@
1
+ module Eve
2
+ class API
3
+ class Response
4
+ class Rowset < Array
5
+ include Inspection
6
+ include WrapObject
7
+ attr_reader :name, :primary_key, :columns
8
+ alias key primary_key
9
+
10
+ def initialize(elem, options = {})
11
+ super()
12
+ @options = options
13
+ parse_elem(elem)
14
+ end
15
+
16
+ def delegate_from(object)
17
+ klass = class << object; self; end
18
+ var_name = name.underscore
19
+ object.instance_variable_set("@#{var_name}", self)
20
+ klass.send(:attr_reader, var_name)
21
+ klass.send(:alias_method, var_name.camelize.dehumanize, var_name)
22
+ end
23
+
24
+ def to_yaml(*args)
25
+ to_a.to_yaml(*args)
26
+ end
27
+
28
+ private
29
+ def parse_elem(elem)
30
+ raise ArgumentError, "Expected an Hpricot::Elem, got #{elem.class}" unless elem.kind_of?(Hpricot::Elem)
31
+ raise ArgumentError, "Expected a rowset element, got #{elem.name}" unless elem.name == 'rowset'
32
+
33
+ @name = elem['name']
34
+ @primary_key = elem['key']
35
+ @columns = elem['columns'].split(/,/).collect { |c| c.strip }
36
+
37
+ elem.children.each do |child|
38
+ if child.is_a?(Hpricot::Elem)
39
+ case child.name
40
+ when 'row' then parse_row(child)
41
+ else raise "Expected a row element, got #{child.name.inspect}"
42
+ end
43
+ end
44
+ end if elem.children
45
+ end
46
+
47
+ def parse_row(elem)
48
+ row = Eve::API::Response.new(elem, @options)
49
+ row.copy_attributes(columns, elem)
50
+ row.send(:parse_children, elem)
51
+ self << row
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,42 @@
1
+ module Eve
2
+ class API
3
+ class Response
4
+ module Rowsets
5
+ def rowset_names
6
+ rowsets.collect { |c| c.name }
7
+ end
8
+
9
+ def add_rowset(rowset)
10
+ rowsets << rowset
11
+ rowset.delegate_from(self)
12
+ end
13
+
14
+ def rowsets; @rowsets ||= []; end
15
+
16
+ def copy_attributes(columns, row_element, into = self)
17
+ attributes = row_element.attributes.to_hash.rename((@options[:column_mapping] || {}))
18
+
19
+ #missing_attributes = columns - attributes.keys
20
+ #extra_attributes = attributes.keys - columns
21
+ #raise Eve::Errors::InvalidRowset,
22
+ # "Missing attributes from row: #{missing_attributes.inspect}" if !missing_attributes.empty?
23
+ #raise Eve::Errors::InvalidRowset,
24
+ # "Extra attributes in row: #{extra_attributes.inspect}" if !extra_attributes.empty?
25
+ if !into.respond_to?(:wrap_object)
26
+ klass = into.class
27
+ klass.send(:include, WrapObject)
28
+ end
29
+ columns.each do |column|
30
+ into.send(:wrap_object, column, value_for(attributes[column]))
31
+ end
32
+ end
33
+
34
+ def value_for(candidate)
35
+ candidate.kind_of?(String) ? YAML::load(candidate) : candidate
36
+ rescue
37
+ candidate
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,15 @@
1
+ module Eve
2
+ class API
3
+ class Response
4
+ module WrapObject
5
+ def wrap_object(method_name, value)
6
+ klass = (class << self; self; end)
7
+ underscored = method_name.to_s.underscore
8
+ klass.send(:attr_reader, underscored)
9
+ klass.send(:delegate, method_name, :to => underscored) unless method_name == underscored
10
+ instance_variable_set("@#{underscored}", value)
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,20 @@
1
+ require 'eve/api/services/map'
2
+ require 'eve/api/services/misc'
3
+ require 'eve/api/services/server'
4
+ require 'eve/api/services/eve'
5
+ require 'eve/api/services/account'
6
+ require 'eve/api/services/character'
7
+ require 'eve/api/services/corporation'
8
+
9
+ module Eve
10
+ class API
11
+ module Services
12
+ def self.included(base)
13
+ base.instance_eval do
14
+ include ::Eve::API::Services::Misc
15
+ include ::Eve::API::Services::Server
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,12 @@
1
+ module Eve
2
+ class API
3
+ module Services
4
+ module Account
5
+ def characters
6
+ validate_credentials(:limited)
7
+ request(:account, :characters)
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,96 @@
1
+ module Eve
2
+ class API
3
+ module Services
4
+ module Character
5
+ #limited API key
6
+ def character_sheet; request(:char, :character_sheet); end
7
+ #limited API key
8
+ def fac_war_stats; request(:char, :fac_war_stats); end
9
+ #limited API key
10
+ def medals; request(:char, :medals); end
11
+ #limited API key
12
+ def skill_in_training; request(:char, :skill_in_training); end
13
+ #limited API key
14
+ def skill_queue; request(:char, :skill_queue); end
15
+ #limited API key
16
+ def standings; request(:char, :standings); end
17
+
18
+ # full API key
19
+ def account_balance; request(:char, :account_balance); end
20
+ # full API key
21
+ def asset_list(version = nil)
22
+ request(:char, :asset_list, {:version => version}.optionalize)
23
+ end
24
+ # full API key
25
+ def industry_jobs; request(:char, :industry_jobs); end
26
+
27
+ # This API call only returns 1000 entries. Often, you will need to gather all entries, and not just the
28
+ # most recent 1000. If this is true for your application, simply pass the :walk option and this EVE library
29
+ # will automatically "walk" backward in time until the server reports that there are no more entries available.
30
+ #
31
+ # Walking is disabled by default, so you need to pass the :walk => true option if you wish to enable this.
32
+ #
33
+ # full API key
34
+ def kill_log(options = {})
35
+ options.reverse_merge!({:walk => false, :walk_id => 'before_kill_id', :walk_association => 'kills' })
36
+ validate_options(options, :walk, :walk_id, :walk_association)
37
+ request(:char, :kill_log, options)
38
+ end
39
+ # full API key
40
+ def mailing_lists; request(:char, :mailing_lists); end
41
+ # full API key
42
+ def mail_messages; request(:char, :mail_messages); end
43
+ # full API key
44
+ def market_orders; request(:char, :market_orders); end
45
+ # full API key
46
+ def notifications; request(:char, :notifications); end
47
+ # full API key
48
+ def research; request(:char, :research); end
49
+
50
+ # This API call only returns 1000 entries. Often, you will need to gather all entries, and not just the
51
+ # most recent 1000. If this is true for your application, simply pass the :walk option and this EVE library
52
+ # will automatically "walk" backward in time until the server reports that there are no more entries available.
53
+ #
54
+ # Walking is disabled by default, so you need to pass the :walk => true option if you wish to enable this.
55
+ #
56
+ # full API key
57
+ def wallet_journal(account_key = 1000, options = { })
58
+ if account_key.kind_of?(Hash)
59
+ options = account_key
60
+ account_key = 1000
61
+ end
62
+ options.reverse_merge!({:walk => false, :walk_id => 'before_ref_id', :walk_association => 'entries' })
63
+ validate_options(options, :walk, :walk_id, :walk_association)
64
+ request(:char, :wallet_journal, options.merge(:account_key => account_key))
65
+ end
66
+
67
+ # This API call only returns 1000 entries. Often, you will need to gather all entries, and not just the
68
+ # most recent 1000. If this is true for your application, simply pass the :walk option and this EVE library
69
+ # will automatically "walk" backward in time until the server reports that there are no more entries available.
70
+ #
71
+ # Walking is disabled by default, so you need to pass the :walk => true option if you wish to enable this.
72
+ #
73
+ # full API key
74
+ def wallet_transactions(options = {})
75
+ options.reverse_merge!({:walk => false, :walk_id => 'before_trans_id', :walk_association => 'transactions' })
76
+ validate_options(options, :walk, :walk_id, :walk_association)
77
+ request(:char, :wallet_transactions, options)
78
+ end
79
+
80
+ alias journal_entries wallet_journal
81
+
82
+ def self.included(base)
83
+ base.instance_eval do
84
+ validate_credentials :limited, :character_id,
85
+ :for => %w(character_sheet fac_war_stats medals skill_in_training skill_queue standings
86
+ )
87
+ validate_credentials :full, :character_id,
88
+ :for => %w(account_balance asset_list industry_jobs kill_log mailing_lists
89
+ mail_messages market_orders notifications research wallet_journal
90
+ wallet_transactions journal_entries)
91
+ end
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,150 @@
1
+ module Eve
2
+ class API
3
+ module Services
4
+ module Corporation
5
+ # limited or no API key
6
+ def corporation_sheet(corporation_id = nil)
7
+ request(:corp, :corporation_sheet, {:corporation_id => corporation_id}.optionalize)
8
+ end
9
+
10
+ # limited API key
11
+ def fac_war_stats
12
+ validate_credentials :limited, :character_id
13
+ request(:corp, :fac_war_stats)
14
+ end
15
+
16
+ # limited API key
17
+ def medals
18
+ validate_credentials :limited, :character_id
19
+ request(:corp, :medals)
20
+ end
21
+
22
+ # limited API key
23
+ def member_medals
24
+ validate_credentials :limited, :character_id
25
+ request(:corp, :member_medals)
26
+ end
27
+
28
+ # full API key
29
+ def account_balance
30
+ validate_credentials :full, :character_id
31
+ request(:corp, :account_balance)
32
+ end
33
+
34
+ # full API key
35
+ def asset_list
36
+ validate_credentials :full, :character_id
37
+ request(:corp, :asset_list)
38
+ end
39
+
40
+ # full API key
41
+ def container_log
42
+ validate_credentials :full, :character_id
43
+ request(:corp, :container_log)
44
+ end
45
+
46
+ # full API key
47
+ def industry_jobs
48
+ validate_credentials :full, :character_id
49
+ request(:corp, :industry_jobs)
50
+ end
51
+
52
+ # full API key
53
+ def market_orders
54
+ validate_credentials :full, :character_id
55
+ request(:corp, :market_orders)
56
+ end
57
+
58
+ # full API key
59
+ def member_security
60
+ validate_credentials :full, :character_id
61
+ request(:corp, :member_security)
62
+ end
63
+
64
+ # full API key
65
+ def member_security_log
66
+ validate_credentials :full, :character_id
67
+ request(:corp, :member_security_log)
68
+ end
69
+
70
+ # full API key
71
+ def member_tracking
72
+ validate_credentials :full, :character_id
73
+ request(:corp, :member_tracking)
74
+ end
75
+
76
+ # full API key
77
+ def shareholders
78
+ validate_credentials :full, :character_id
79
+ request(:corp, :shareholders)
80
+ end
81
+
82
+ # full API key
83
+ def standings
84
+ validate_credentials :full, :character_id
85
+ request(:corp, :standings)
86
+ end
87
+
88
+ # full API key
89
+ def titles
90
+ validate_credentials :full, :character_id
91
+ request(:corp, :titles)
92
+ end
93
+
94
+ def starbase_detail(item_id, version = 2)
95
+ validate_credentials :full, :character_id
96
+ request(:corp, :starbase_detail, {:item_id => item_id, :version => version})
97
+ end
98
+
99
+ def starbase_list
100
+ validate_credentials :full, :character_id
101
+ request(:corp, :starbase_list, :version => 2)
102
+ end
103
+
104
+ # This API call only returns 1000 entries. Often, you will need to gather all entries, and not just the
105
+ # most recent 1000. If this is true for your application, simply pass the :walk option and this EVE library
106
+ # will automatically "walk" backward in time until the server reports that there are no more entries available.
107
+ #
108
+ # Walking is disabled by default, so you need to pass the :walk => true option if you wish to enable this.
109
+ def kill_log(options = {})
110
+ validate_credentials :full, :character_id
111
+ options.reverse_merge!({:walk => false, :walk_id => 'before_kill_id', :walk_association => 'kills' })
112
+ validate_options(options, :walk, :walk_id, :walk_association)
113
+ request(:corp, :kill_log, options)
114
+ end
115
+
116
+ # This API call only returns 1000 entries. Often, you will need to gather all entries, and not just the
117
+ # most recent 1000. If this is true for your application, simply pass the :walk option and this EVE library
118
+ # will automatically "walk" backward in time until the server reports that there are no more entries available.
119
+ #
120
+ # Walking is disabled by default, so you need to pass the :walk => true option if you wish to enable this.
121
+ def wallet_journal(account_key = 1000, options = {})
122
+ validate_credentials :full, :character_id
123
+ if account_key.kind_of?(Hash)
124
+ options.merge! account_key
125
+ account_key = 1000
126
+ end
127
+ options.reverse_merge!({:walk => false, :walk_id => 'before_ref_id', :walk_association => 'entries' })
128
+ validate_options(options, :walk, :walk_id, :walk_association)
129
+ request(:corp, :wallet_journal, options.merge(:account_key => account_key))
130
+ end
131
+
132
+ # This API call only returns 1000 entries. Often, you will need to gather all entries, and not just the
133
+ # most recent 1000. If this is true for your application, simply pass the :walk option and this EVE library
134
+ # will automatically "walk" backward in time until the server reports that there are no more entries available.
135
+ #
136
+ # Walking is disabled by default, so you need to pass the :walk => true option if you wish to enable this.
137
+ def wallet_transactions(account_key = 1000, options = {})
138
+ validate_credentials :full, :character_id
139
+ if account_key.kind_of?(Hash)
140
+ options.merge! account_key
141
+ account_key = 1000
142
+ end
143
+ options.reverse_merge!({:walk => false, :walk_id => 'before_trans_id', :walk_association => 'transactions' })
144
+ validate_options(options, :walk, :walk_id, :walk_association)
145
+ request(:corp, :wallet_transactions, options.merge(:account_key => account_key))
146
+ end
147
+ end
148
+ end
149
+ end
150
+ end