eve_online 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +560 -17
- data/eve_online.gemspec +1 -0
- data/lib/eve_online.rb +33 -0
- data/lib/eve_online/account/api_key_info.rb +19 -14
- data/lib/eve_online/account/characters.rb +10 -5
- data/lib/eve_online/account/status.rb +4 -4
- data/lib/eve_online/base.rb +9 -4
- data/lib/eve_online/base_xml.rb +9 -4
- data/lib/eve_online/blueprint.rb +9 -9
- data/lib/eve_online/bookmark.rb +13 -11
- data/lib/eve_online/bookmark_folder.rb +21 -16
- data/lib/eve_online/character.rb +8 -8
- data/lib/eve_online/character_implants.rb +7 -1
- data/lib/eve_online/character_jump_clone_implants.rb +29 -0
- data/lib/eve_online/character_jump_clones.rb +7 -1
- data/lib/eve_online/character_skills.rb +7 -1
- data/lib/eve_online/characters/account_balance.rb +14 -8
- data/lib/eve_online/characters/asset_list.rb +12 -5
- data/lib/eve_online/characters/blueprints.rb +12 -5
- data/lib/eve_online/characters/bookmarks.rb +22 -17
- data/lib/eve_online/characters/calendar_event_attendees.rb +2 -0
- data/lib/eve_online/characters/character_sheet.rb +48 -37
- data/lib/eve_online/characters/chat_channels.rb +23 -0
- data/lib/eve_online/characters/contact_list.rb +2 -0
- data/lib/eve_online/characters/contact_notifications.rb +30 -0
- data/lib/eve_online/characters/contract_bids.rb +23 -0
- data/lib/eve_online/characters/contract_items.rb +24 -0
- data/lib/eve_online/characters/contracts.rb +26 -0
- data/lib/eve_online/characters/fac_war_stats.rb +23 -0
- data/lib/eve_online/characters/industry_jobs.rb +23 -0
- data/lib/eve_online/characters/industry_jobs_history.rb +23 -0
- data/lib/eve_online/characters/kill_mails.rb +25 -0
- data/lib/eve_online/characters/locations.rb +32 -0
- data/lib/eve_online/characters/mail_bodies.rb +30 -0
- data/lib/eve_online/characters/mail_messages.rb +23 -0
- data/lib/eve_online/characters/mailing_lists.rb +23 -0
- data/lib/eve_online/characters/market_orders.rb +55 -0
- data/lib/eve_online/characters/medals.rb +2 -0
- data/lib/eve_online/characters/notification_texts.rb +32 -0
- data/lib/eve_online/characters/notifications.rb +23 -0
- data/lib/eve_online/characters/planetary_colonies.rb +23 -0
- data/lib/eve_online/characters/planetary_links.rb +24 -0
- data/lib/eve_online/characters/planetary_pins.rb +24 -0
- data/lib/eve_online/characters/planetary_routes.rb +24 -0
- data/lib/eve_online/characters/research.rb +23 -0
- data/lib/eve_online/characters/skill_in_training.rb +10 -8
- data/lib/eve_online/characters/skill_queue.rb +51 -0
- data/lib/eve_online/characters/standings.rb +23 -21
- data/lib/eve_online/characters/upcoming_calendar_events.rb +12 -5
- data/lib/eve_online/characters/wallet_journal.rb +57 -0
- data/lib/eve_online/characters/wallet_transactions.rb +24 -0
- data/lib/eve_online/contact_notification.rb +42 -0
- data/lib/eve_online/corporations/market_orders.rb +55 -0
- data/lib/eve_online/eve/character_id.rb +9 -9
- data/lib/eve_online/event.rb +12 -10
- data/lib/eve_online/implant.rb +2 -2
- data/lib/eve_online/item.rb +7 -7
- data/lib/eve_online/jump_clone.rb +4 -4
- data/lib/eve_online/jump_clone_implant.rb +29 -0
- data/lib/eve_online/market_order.rb +91 -0
- data/lib/eve_online/server/status.rb +2 -2
- data/lib/eve_online/skill.rb +4 -4
- data/lib/eve_online/skill_queue_entry.rb +51 -0
- data/lib/eve_online/sovereignty/campaigns.rb +1 -1
- data/lib/eve_online/standing.rb +3 -3
- data/lib/eve_online/version.rb +1 -1
- data/lib/eve_online/wallet_journal_entry.rb +97 -0
- metadata +46 -2
@@ -1,5 +1,9 @@
|
|
1
|
+
require 'memoist'
|
2
|
+
|
1
3
|
module EveOnline
|
2
4
|
class CharacterImplants
|
5
|
+
extend Memoist
|
6
|
+
|
3
7
|
attr_reader :result
|
4
8
|
|
5
9
|
def initialize(result)
|
@@ -13,11 +17,13 @@ module EveOnline
|
|
13
17
|
end
|
14
18
|
output
|
15
19
|
end
|
20
|
+
memoize :implants
|
16
21
|
|
17
22
|
private
|
18
23
|
|
19
24
|
def rowset
|
20
|
-
|
25
|
+
result.fetch('rowset').reject { |a| a.fetch('@name') != 'implants' }.first.fetch('row')
|
21
26
|
end
|
27
|
+
memoize :rowset
|
22
28
|
end
|
23
29
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'memoist'
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
class CharacterJumpCloneImplants
|
5
|
+
extend Memoist
|
6
|
+
|
7
|
+
attr_reader :result
|
8
|
+
|
9
|
+
def initialize(result)
|
10
|
+
@result = result
|
11
|
+
end
|
12
|
+
|
13
|
+
def jump_clone_implants
|
14
|
+
output = []
|
15
|
+
rowset.each do |jump_clone_implant|
|
16
|
+
output << JumpCloneImplant.new(jump_clone_implant)
|
17
|
+
end
|
18
|
+
output
|
19
|
+
end
|
20
|
+
memoize :jump_clone_implants
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def rowset
|
25
|
+
result.fetch('rowset').reject { |a| a.fetch('@name') != 'jumpCloneImplants' }.first.fetch('row')
|
26
|
+
end
|
27
|
+
memoize :rowset
|
28
|
+
end
|
29
|
+
end
|
@@ -1,5 +1,9 @@
|
|
1
|
+
require 'memoist'
|
2
|
+
|
1
3
|
module EveOnline
|
2
4
|
class CharacterJumpClones
|
5
|
+
extend Memoist
|
6
|
+
|
3
7
|
attr_reader :result
|
4
8
|
|
5
9
|
def initialize(result)
|
@@ -13,11 +17,13 @@ module EveOnline
|
|
13
17
|
end
|
14
18
|
output
|
15
19
|
end
|
20
|
+
memoize :jump_clones
|
16
21
|
|
17
22
|
private
|
18
23
|
|
19
24
|
def rowset
|
20
|
-
|
25
|
+
result.fetch('rowset').reject { |a| a.fetch('@name') != 'jumpClones' }.first.fetch('row')
|
21
26
|
end
|
27
|
+
memoize :rowset
|
22
28
|
end
|
23
29
|
end
|
@@ -1,5 +1,9 @@
|
|
1
|
+
require 'memoist'
|
2
|
+
|
1
3
|
module EveOnline
|
2
4
|
class CharacterSkills
|
5
|
+
extend Memoist
|
6
|
+
|
3
7
|
attr_reader :result
|
4
8
|
|
5
9
|
def initialize(result)
|
@@ -13,11 +17,13 @@ module EveOnline
|
|
13
17
|
end
|
14
18
|
output
|
15
19
|
end
|
20
|
+
memoize :skills
|
16
21
|
|
17
22
|
private
|
18
23
|
|
19
24
|
def rowset
|
20
|
-
|
25
|
+
result.fetch('rowset').reject { |a| a.fetch('@name') != 'skills' }.first.fetch('row')
|
21
26
|
end
|
27
|
+
memoize :rowset
|
22
28
|
end
|
23
29
|
end
|
@@ -4,6 +4,8 @@ module EveOnline
|
|
4
4
|
class AccountBalance < BaseXML
|
5
5
|
API_ENDPOINT = 'https://api.eveonline.com/char/AccountBalance.xml.aspx'.freeze
|
6
6
|
|
7
|
+
ACCESS_MASK = 1
|
8
|
+
|
7
9
|
attr_reader :key_id, :v_code, :character_id
|
8
10
|
|
9
11
|
def initialize(key_id, v_code, character_id)
|
@@ -24,28 +26,32 @@ module EveOnline
|
|
24
26
|
end
|
25
27
|
|
26
28
|
def account_id
|
27
|
-
|
29
|
+
row.fetch('@accountID').to_i
|
28
30
|
end
|
29
31
|
|
30
32
|
def account_key
|
31
|
-
|
33
|
+
row.fetch('@accountKey').to_i
|
32
34
|
end
|
33
35
|
|
34
36
|
def balance
|
35
|
-
|
37
|
+
row.fetch('@balance').to_f
|
36
38
|
end
|
37
39
|
|
38
|
-
def
|
39
|
-
|
40
|
+
def url
|
41
|
+
"#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }"
|
40
42
|
end
|
41
43
|
|
44
|
+
private
|
45
|
+
|
42
46
|
def rowset
|
43
|
-
|
47
|
+
result.fetch('rowset')
|
44
48
|
end
|
49
|
+
memoize :rowset
|
45
50
|
|
46
|
-
def
|
47
|
-
|
51
|
+
def row
|
52
|
+
rowset.fetch('row')
|
48
53
|
end
|
54
|
+
memoize :row
|
49
55
|
end
|
50
56
|
end
|
51
57
|
end
|
@@ -4,6 +4,8 @@ module EveOnline
|
|
4
4
|
class AssetList < BaseXML
|
5
5
|
API_ENDPOINT = 'https://api.eveonline.com/char/AssetList.xml.aspx'.freeze
|
6
6
|
|
7
|
+
ACCESS_MASK = 2
|
8
|
+
|
7
9
|
attr_reader :key_id, :v_code, :character_id, :flat
|
8
10
|
|
9
11
|
def initialize(key_id, v_code, character_id, flat = 1)
|
@@ -28,18 +30,23 @@ module EveOnline
|
|
28
30
|
raise ArgumentError
|
29
31
|
end
|
30
32
|
end
|
33
|
+
memoize :assets
|
31
34
|
|
32
|
-
def
|
33
|
-
|
35
|
+
def url
|
36
|
+
"#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }&flat=#{ flat }"
|
34
37
|
end
|
35
38
|
|
39
|
+
private
|
40
|
+
|
36
41
|
def rowset
|
37
|
-
|
42
|
+
result.fetch('rowset')
|
38
43
|
end
|
44
|
+
memoize :rowset
|
39
45
|
|
40
|
-
def
|
41
|
-
|
46
|
+
def row
|
47
|
+
rowset.fetch('row')
|
42
48
|
end
|
49
|
+
memoize :row
|
43
50
|
end
|
44
51
|
end
|
45
52
|
end
|
@@ -4,6 +4,8 @@ module EveOnline
|
|
4
4
|
class Blueprints < BaseXML
|
5
5
|
API_ENDPOINT = 'https://api.eveonline.com/char/Blueprints.xml.aspx'.freeze
|
6
6
|
|
7
|
+
ACCESS_MASK = 2
|
8
|
+
|
7
9
|
attr_reader :key_id, :v_code, :character_id
|
8
10
|
|
9
11
|
def initialize(key_id, v_code, character_id)
|
@@ -27,18 +29,23 @@ module EveOnline
|
|
27
29
|
raise ArgumentError
|
28
30
|
end
|
29
31
|
end
|
32
|
+
memoize :blueprints
|
30
33
|
|
31
|
-
def
|
32
|
-
|
34
|
+
def url
|
35
|
+
"#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }"
|
33
36
|
end
|
34
37
|
|
38
|
+
private
|
39
|
+
|
35
40
|
def rowset
|
36
|
-
|
41
|
+
result.fetch('rowset')
|
37
42
|
end
|
43
|
+
memoize :rowset
|
38
44
|
|
39
|
-
def
|
40
|
-
|
45
|
+
def row
|
46
|
+
rowset.fetch('row')
|
41
47
|
end
|
48
|
+
memoize :row
|
42
49
|
end
|
43
50
|
end
|
44
51
|
end
|
@@ -4,6 +4,8 @@ module EveOnline
|
|
4
4
|
class Bookmarks < BaseXML
|
5
5
|
API_ENDPOINT = 'https://api.eveonline.com/char/Bookmarks.xml.aspx'.freeze
|
6
6
|
|
7
|
+
ACCESS_MASK = 268_435_456
|
8
|
+
|
7
9
|
attr_reader :key_id, :v_code, :character_id
|
8
10
|
|
9
11
|
def initialize(key_id, v_code, character_id)
|
@@ -14,33 +16,36 @@ module EveOnline
|
|
14
16
|
end
|
15
17
|
|
16
18
|
def bookmark_folders
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
bookmark_folders << BookmarkFolder.new(bookmark_folder)
|
25
|
-
end
|
26
|
-
bookmark_folders
|
27
|
-
else
|
28
|
-
raise ArgumentError
|
19
|
+
case row
|
20
|
+
when Hash
|
21
|
+
[BookmarkFolder.new(row)]
|
22
|
+
when Array
|
23
|
+
output = []
|
24
|
+
row.each do |bookmark_folder|
|
25
|
+
output << BookmarkFolder.new(bookmark_folder)
|
29
26
|
end
|
27
|
+
output
|
28
|
+
else
|
29
|
+
raise ArgumentError
|
30
30
|
end
|
31
31
|
end
|
32
|
+
memoize :bookmark_folders
|
32
33
|
|
33
|
-
def
|
34
|
-
|
34
|
+
def url
|
35
|
+
"#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }"
|
35
36
|
end
|
36
37
|
|
38
|
+
private
|
39
|
+
|
37
40
|
def rowset
|
38
|
-
|
41
|
+
result.fetch('rowset')
|
39
42
|
end
|
43
|
+
memoize :rowset
|
40
44
|
|
41
|
-
def
|
42
|
-
|
45
|
+
def row
|
46
|
+
rowset.fetch('row')
|
43
47
|
end
|
48
|
+
memoize :row
|
44
49
|
end
|
45
50
|
end
|
46
51
|
end
|
@@ -4,6 +4,8 @@ module EveOnline
|
|
4
4
|
class CalendarEventAttendees < BaseXML
|
5
5
|
API_ENDPOINT = 'https://api.eveonline.com/char/CalendarEventAttendees.xml.aspx'.freeze
|
6
6
|
|
7
|
+
ACCESS_MASK = 4
|
8
|
+
|
7
9
|
attr_reader :key_id, :v_code, :character_id, :event_id
|
8
10
|
|
9
11
|
def initialize(key_id, v_code, character_id, event_id)
|
@@ -4,6 +4,8 @@ module EveOnline
|
|
4
4
|
class CharacterSheet < BaseXML
|
5
5
|
API_ENDPOINT = 'https://api.eveonline.com/char/CharacterSheet.xml.aspx'.freeze
|
6
6
|
|
7
|
+
ACCESS_MASK = 8
|
8
|
+
|
7
9
|
attr_reader :key_id, :v_code, :character_id
|
8
10
|
|
9
11
|
def initialize(key_id, v_code, character_id)
|
@@ -44,152 +46,160 @@ module EveOnline
|
|
44
46
|
end
|
45
47
|
|
46
48
|
def name
|
47
|
-
|
49
|
+
result.fetch('name')
|
48
50
|
end
|
49
51
|
|
50
52
|
def home_station_id
|
51
|
-
|
53
|
+
result.fetch('homeStationID').to_i
|
52
54
|
end
|
53
55
|
|
54
56
|
def dob
|
55
|
-
|
57
|
+
parse_datetime_with_timezone(result.fetch('DoB'))
|
56
58
|
end
|
57
59
|
|
58
60
|
def race
|
59
|
-
|
61
|
+
result.fetch('race')
|
60
62
|
end
|
61
63
|
|
62
64
|
def blood_line_id
|
63
|
-
|
65
|
+
result.fetch('bloodLineID').to_i
|
64
66
|
end
|
65
67
|
|
66
68
|
def blood_line
|
67
|
-
|
69
|
+
result.fetch('bloodLine')
|
68
70
|
end
|
69
71
|
|
70
72
|
def ancestry_id
|
71
|
-
|
73
|
+
result.fetch('ancestryID').to_i
|
72
74
|
end
|
73
75
|
|
74
76
|
def ancestry
|
75
|
-
|
77
|
+
result.fetch('ancestry')
|
76
78
|
end
|
77
79
|
|
78
80
|
def gender
|
79
|
-
|
81
|
+
result.fetch('gender').downcase.to_sym
|
80
82
|
end
|
81
83
|
|
82
84
|
def corporation_name
|
83
|
-
|
85
|
+
result.fetch('corporationName')
|
84
86
|
end
|
85
87
|
|
86
88
|
def corporation_id
|
87
|
-
|
89
|
+
result.fetch('corporationID').to_i
|
88
90
|
end
|
89
91
|
|
90
92
|
def alliance_name
|
91
93
|
# TODO: Corporation "Federal Navy Academy" doesn't have allianceName in response
|
92
|
-
|
94
|
+
result.fetch('allianceName')
|
93
95
|
end
|
94
96
|
|
95
97
|
def alliance_id
|
96
98
|
# TODO: Corporation "Federal Navy Academy" doesn't have allianceID in response
|
97
|
-
|
99
|
+
result.fetch('allianceID').to_i
|
98
100
|
end
|
99
101
|
|
100
102
|
def faction_name
|
101
103
|
# TODO: Corporation "Federal Navy Academy" doesn't have factionName in response
|
102
|
-
|
104
|
+
result.fetch('factionName')
|
103
105
|
end
|
104
106
|
|
105
107
|
def faction_id
|
106
108
|
# TODO: Corporation "Federal Navy Academy" doesn't have factionID in response
|
107
|
-
|
109
|
+
result.fetch('factionID').to_i
|
108
110
|
end
|
109
111
|
|
110
112
|
def clone_type_id
|
111
|
-
|
113
|
+
result.fetch('cloneTypeID').to_i
|
112
114
|
end
|
113
115
|
|
114
116
|
def clone_name
|
115
|
-
|
117
|
+
result.fetch('cloneName')
|
116
118
|
end
|
117
119
|
|
118
120
|
def clone_skill_points
|
119
|
-
|
121
|
+
result.fetch('cloneSkillPoints').to_i
|
120
122
|
end
|
121
123
|
|
122
124
|
def free_skill_points
|
123
|
-
|
125
|
+
result.fetch('freeSkillPoints').to_i
|
124
126
|
end
|
125
127
|
|
126
128
|
def free_respecs
|
127
|
-
|
129
|
+
result.fetch('freeRespecs').to_i
|
128
130
|
end
|
129
131
|
|
130
132
|
def clone_jump_date
|
131
|
-
|
133
|
+
parse_datetime_with_timezone(result.fetch('cloneJumpDate'))
|
132
134
|
end
|
133
135
|
|
134
136
|
def last_respec_date
|
135
|
-
|
137
|
+
parse_datetime_with_timezone(result.fetch('lastRespecDate'))
|
136
138
|
end
|
137
139
|
|
138
140
|
def last_timed_respec
|
139
|
-
|
141
|
+
parse_datetime_with_timezone(result.fetch('lastTimedRespec'))
|
140
142
|
end
|
141
143
|
|
142
144
|
def remote_station_date
|
143
|
-
|
145
|
+
parse_datetime_with_timezone(result.fetch('remoteStationDate'))
|
144
146
|
end
|
145
147
|
|
146
148
|
def jump_activation
|
147
|
-
|
149
|
+
parse_datetime_with_timezone(result.fetch('jumpActivation'))
|
148
150
|
end
|
149
151
|
|
150
152
|
def jump_fatigue
|
151
|
-
|
153
|
+
parse_datetime_with_timezone(result.fetch('jumpFatigue'))
|
152
154
|
end
|
153
155
|
|
154
156
|
def jump_last_update
|
155
|
-
|
157
|
+
parse_datetime_with_timezone(result.fetch('jumpLastUpdate'))
|
156
158
|
end
|
157
159
|
|
158
160
|
def balance
|
159
|
-
|
161
|
+
result.fetch('balance').to_f
|
160
162
|
end
|
161
163
|
|
162
164
|
def base_intelligence
|
163
|
-
|
165
|
+
attributes.fetch('intelligence').to_i
|
164
166
|
end
|
165
167
|
|
166
168
|
def base_memory
|
167
|
-
|
169
|
+
attributes.fetch('memory').to_i
|
168
170
|
end
|
169
171
|
|
170
172
|
def base_charisma
|
171
|
-
|
173
|
+
attributes.fetch('charisma').to_i
|
172
174
|
end
|
173
175
|
|
174
176
|
def base_perception
|
175
|
-
|
177
|
+
attributes.fetch('perception').to_i
|
176
178
|
end
|
177
179
|
|
178
180
|
def base_willpower
|
179
|
-
|
181
|
+
attributes.fetch('willpower').to_i
|
180
182
|
end
|
181
183
|
|
182
184
|
def implants
|
183
|
-
|
185
|
+
CharacterImplants.new(result).implants
|
184
186
|
end
|
187
|
+
memoize :implants
|
185
188
|
|
186
189
|
def skills
|
187
|
-
|
190
|
+
CharacterSkills.new(result).skills
|
188
191
|
end
|
192
|
+
memoize :skills
|
189
193
|
|
190
194
|
def jump_clones
|
191
|
-
|
195
|
+
CharacterJumpClones.new(result).jump_clones
|
196
|
+
end
|
197
|
+
memoize :jump_clones
|
198
|
+
|
199
|
+
def jump_clone_implants
|
200
|
+
CharacterJumpCloneImplants.new(result).jump_clone_implants
|
192
201
|
end
|
202
|
+
memoize :jump_clone_implants
|
193
203
|
|
194
204
|
def url
|
195
205
|
"#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }"
|
@@ -198,8 +208,9 @@ module EveOnline
|
|
198
208
|
private
|
199
209
|
|
200
210
|
def attributes
|
201
|
-
|
211
|
+
result.fetch('attributes')
|
202
212
|
end
|
213
|
+
memoize :attributes
|
203
214
|
end
|
204
215
|
end
|
205
216
|
end
|