reve 0.1.0 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/reve.rb +150 -254
- data/lib/reve/classes.rb +199 -131
- data/test/test_reve.rb +98 -29
- data/test/xml/mail_messages.xml +9 -9
- metadata +162 -47
data/lib/reve/classes.rb
CHANGED
@@ -10,15 +10,15 @@
|
|
10
10
|
#++
|
11
11
|
module Reve #:nodoc:
|
12
12
|
module Classes #:nodoc:
|
13
|
-
|
13
|
+
|
14
14
|
class Name
|
15
15
|
attr_reader :id, :name
|
16
16
|
def initialize(elem) #:nodoc:
|
17
17
|
@id = elem['id'].to_i
|
18
|
-
@id = elem['name']
|
18
|
+
@id = elem['name']
|
19
19
|
end
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
# Represents an Alliance as it appears in the Reve::API#alliances call.
|
23
23
|
# Attributes
|
24
24
|
# * name ( String ) - Full Name of the Alliance
|
@@ -51,9 +51,11 @@ module Reve #:nodoc:
|
|
51
51
|
def initialize(elem) #:nodoc:
|
52
52
|
@id = elem['corporationID'].to_i
|
53
53
|
@start_date = elem['startDate'].to_time
|
54
|
-
end
|
54
|
+
end
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
|
+
|
58
|
+
|
57
59
|
class EveFactionWarStat
|
58
60
|
attr_accessor :faction_participants, :faction_wars
|
59
61
|
attr_reader :kills_yesterday, :kills_last_week, :kills_total,
|
@@ -70,7 +72,7 @@ module Reve #:nodoc:
|
|
70
72
|
@victory_points_total = elem['victoryPointsTotal'].to_i
|
71
73
|
end
|
72
74
|
end
|
73
|
-
|
75
|
+
|
74
76
|
# Maps a participant in a FactionWar. Can be a:
|
75
77
|
# * PersonalFactionWarParticpant
|
76
78
|
# * CorporateFactionWarParticpant
|
@@ -85,8 +87,8 @@ module Reve #:nodoc:
|
|
85
87
|
# * victory_points_last_week ( Fixnum )
|
86
88
|
# * victory_points_total ( Fixnum )
|
87
89
|
class FactionWarParticpant
|
88
|
-
attr_reader :faction_id, :faction_name, :enlisted_at, :kills_yesterday,
|
89
|
-
:kills_last_week, :kills_total, :victory_points_yesterday,
|
90
|
+
attr_reader :faction_id, :faction_name, :enlisted_at, :kills_yesterday,
|
91
|
+
:kills_last_week, :kills_total, :victory_points_yesterday,
|
90
92
|
:victory_points_last_week, :victory_points_total
|
91
93
|
def initialize(elem) #:nodoc:
|
92
94
|
@faction_id = elem['factionID'].to_i
|
@@ -99,7 +101,7 @@ module Reve #:nodoc:
|
|
99
101
|
@victory_points_total = elem['victoryPointsTotal'].to_i
|
100
102
|
end
|
101
103
|
end
|
102
|
-
|
104
|
+
|
103
105
|
# Represents a Character's stats as a FactionWarParticpant.
|
104
106
|
# Attributes:
|
105
107
|
# * (See FactionWarParticpant for more)
|
@@ -115,7 +117,7 @@ module Reve #:nodoc:
|
|
115
117
|
@enlisted_at = elem['enlisted'].to_time
|
116
118
|
end
|
117
119
|
end
|
118
|
-
|
120
|
+
|
119
121
|
# Represents a Corpration's stats as a FactionWarParticpant.
|
120
122
|
# Attributes:
|
121
123
|
# * (See FactionWarParticpant for more)
|
@@ -129,7 +131,7 @@ module Reve #:nodoc:
|
|
129
131
|
@enlisted_at = elem['enlisted'].to_time
|
130
132
|
end
|
131
133
|
end
|
132
|
-
|
134
|
+
|
133
135
|
# Represents an entire Faction's stats as a FactionWarParticpant.
|
134
136
|
# Attributes:
|
135
137
|
# * (See FactionWarParticpant for more)
|
@@ -142,7 +144,7 @@ module Reve #:nodoc:
|
|
142
144
|
@systems_controlled = elem['systemsControlled'].to_i
|
143
145
|
end
|
144
146
|
end
|
145
|
-
|
147
|
+
|
146
148
|
# Represents a single FactionWar between two Factions (e.g., Gallente v. Caldari)
|
147
149
|
# Attributes:
|
148
150
|
# * faction_id ( Fixnum ) - ID of the belligerant Faction
|
@@ -156,9 +158,9 @@ module Reve #:nodoc:
|
|
156
158
|
@faction_name = elem['factionName']
|
157
159
|
@against_id = elem['againstID'].to_i
|
158
160
|
@against_name = elem['againstName']
|
159
|
-
end
|
161
|
+
end
|
160
162
|
end
|
161
|
-
|
163
|
+
|
162
164
|
# Represents a single Contact
|
163
165
|
# Attributes:
|
164
166
|
# * contact_id ( Fixnum ) - ID of the Contact.
|
@@ -172,13 +174,13 @@ module Reve #:nodoc:
|
|
172
174
|
@contact_name = elem['contactName']
|
173
175
|
@in_watchlist = elem['inWatchlist'] == 'True' ? true : false
|
174
176
|
@standing = elem['standing'].to_i
|
175
|
-
end
|
177
|
+
end
|
176
178
|
end
|
177
|
-
|
179
|
+
|
178
180
|
class CorporateContact < PersonalContact; end
|
179
181
|
class AllianceContact < PersonalContact; end
|
180
|
-
|
181
|
-
# The status of a System with regards to a FactionWar. Who controls what
|
182
|
+
|
183
|
+
# The status of a System with regards to a FactionWar. Who controls what
|
182
184
|
# and what System is contested
|
183
185
|
# Attributes:
|
184
186
|
# * system_id ( Fixnum ) - ID of the System
|
@@ -200,14 +202,14 @@ module Reve #:nodoc:
|
|
200
202
|
end
|
201
203
|
end
|
202
204
|
end
|
203
|
-
|
205
|
+
|
204
206
|
class FactionWarKills
|
205
207
|
attr_reader :kills
|
206
208
|
def initialize(elem) #:nodoc:
|
207
209
|
@kills = elem['kills'].to_i
|
208
210
|
end
|
209
211
|
end
|
210
|
-
|
212
|
+
|
211
213
|
class CharacterFactionKills < FactionWarKills
|
212
214
|
attr_reader :name, :id
|
213
215
|
def initialize(elem) #:nodoc:
|
@@ -216,6 +218,7 @@ module Reve #:nodoc:
|
|
216
218
|
@id = elem['characterID'].to_i
|
217
219
|
end
|
218
220
|
end
|
221
|
+
|
219
222
|
class CorporationFactionKills < FactionWarKills
|
220
223
|
attr_reader :name, :id
|
221
224
|
def initialize(elem) #:nodoc:
|
@@ -224,6 +227,7 @@ module Reve #:nodoc:
|
|
224
227
|
@id = elem['corporationID'].to_i
|
225
228
|
end
|
226
229
|
end
|
230
|
+
|
227
231
|
class FactionKills < FactionWarKills
|
228
232
|
attr_reader :name, :id
|
229
233
|
def initialize(elem) #:nodoc:
|
@@ -231,14 +235,15 @@ module Reve #:nodoc:
|
|
231
235
|
@name = elem['factionName']
|
232
236
|
@id = elem['factionID'].to_i
|
233
237
|
end
|
234
|
-
end
|
235
|
-
|
238
|
+
end
|
239
|
+
|
236
240
|
class FactionWarVictoryPoints
|
237
241
|
attr_reader :victory_points
|
238
242
|
def initialize(elem) #:nodoc:
|
239
243
|
@victory_points = elem['victoryPoints'].to_i
|
240
244
|
end
|
241
245
|
end
|
246
|
+
|
242
247
|
class CharacterFactionVictoryPoints < FactionWarVictoryPoints
|
243
248
|
attr_reader :name, :id
|
244
249
|
def initialize(elem) #:nodoc:
|
@@ -247,6 +252,7 @@ module Reve #:nodoc:
|
|
247
252
|
@id = elem['characterID'].to_i
|
248
253
|
end
|
249
254
|
end
|
255
|
+
|
250
256
|
class CorporationFactionVictoryPoints < FactionWarVictoryPoints
|
251
257
|
attr_reader :name, :id
|
252
258
|
def initialize(elem) #:nodoc:
|
@@ -255,6 +261,7 @@ module Reve #:nodoc:
|
|
255
261
|
@id = elem['corporationID'].to_i
|
256
262
|
end
|
257
263
|
end
|
264
|
+
|
258
265
|
class FactionVictoryPoints < FactionWarVictoryPoints
|
259
266
|
attr_reader :name, :id
|
260
267
|
def initialize(elem) #:nodoc:
|
@@ -263,7 +270,7 @@ module Reve #:nodoc:
|
|
263
270
|
@id = elem['factionID'].to_i
|
264
271
|
end
|
265
272
|
end
|
266
|
-
|
273
|
+
|
267
274
|
# Faction War Top Stats. This is different than the rest of the classes.
|
268
275
|
# Each attribute on this class is a Hash with the following keys:
|
269
276
|
# * yesterday_kills ( Array )
|
@@ -283,11 +290,11 @@ module Reve #:nodoc:
|
|
283
290
|
def initialize(characters, corporations, factions) #:nodoc:
|
284
291
|
@characters = characters
|
285
292
|
@corporations = corporations
|
286
|
-
@factions = factions
|
293
|
+
@factions = factions
|
287
294
|
end
|
288
|
-
|
295
|
+
|
289
296
|
end
|
290
|
-
|
297
|
+
|
291
298
|
# A Research object holds information about Agents the Character is doing research with.
|
292
299
|
# Attributes
|
293
300
|
# * agent_id ( Fixnum ) - ID of the Agent
|
@@ -306,7 +313,41 @@ module Reve #:nodoc:
|
|
306
313
|
@remainder_points = elem['remainderPoints'].to_f
|
307
314
|
end
|
308
315
|
end
|
309
|
-
|
316
|
+
|
317
|
+
#
|
318
|
+
#Characters contracts
|
319
|
+
#
|
320
|
+
class Contracts
|
321
|
+
attr_reader :contractID, :issuerID, :issuerCorpID, :assigneeID
|
322
|
+
attr_reader :acceptorID, :startStationID, :endStationID, :type, :status
|
323
|
+
attr_reader :title, :forCorp, :availability, :dateIssued, :dateExpired, :dateAccepted
|
324
|
+
attr_reader :numDays, :dateCompleted, :price, :reward, :collateral, :buyout
|
325
|
+
attr_reader :volume
|
326
|
+
def initialize(elem) #:nodoc:
|
327
|
+
@contractID =elem['contractID'].to_i
|
328
|
+
@issuerID =elem['issuerID'].to_i
|
329
|
+
@issuerCorpID =elem['issuerCorpID'].to_i
|
330
|
+
@assigneeID =elem['assigneeID'].to_i
|
331
|
+
@acceptorID =elem['acceptorID'].to_i
|
332
|
+
@startStationID =elem['startStationID'].to_i
|
333
|
+
@endStationID =elem['endStationID'].to_i
|
334
|
+
@type =elem['type'].to_s
|
335
|
+
@status =elem['status'].to_s
|
336
|
+
@title =elem['title'].to_s
|
337
|
+
@forCorp =elem['forCorp'].to_i
|
338
|
+
@availability =elem['availability'].to_s
|
339
|
+
@dateIssued =elem['dateIssued'].to_time
|
340
|
+
@dateExpired =elem['dateExpired'].to_time
|
341
|
+
@dateAccepted =elem['dateAccepted'].to_time
|
342
|
+
@numDays =elem['numDays'].to_i
|
343
|
+
@dateCompleted =elem['dateCompleted'].to_time
|
344
|
+
@price =elem['price'].to_f
|
345
|
+
@reward =elem['reward'].to_f
|
346
|
+
@collateral =elem['collateral'].to_f
|
347
|
+
@buyout =elem['buyout'].to_f
|
348
|
+
@volume =elem['volume'].to_i
|
349
|
+
end
|
350
|
+
end
|
310
351
|
# A Skill has a RequiredAttribute, either a PrimaryAttribute or SecondaryAttribute, which both derrive from this.
|
311
352
|
# Attributes
|
312
353
|
# * name ( String ) - Name of the required Attribute
|
@@ -325,7 +366,7 @@ module Reve #:nodoc:
|
|
325
366
|
# PrimaryAttribute and RequiredAttribute
|
326
367
|
class SecondaryAttribute < RequiredAttribute
|
327
368
|
end
|
328
|
-
|
369
|
+
|
329
370
|
# Represents the victim of a Kill.
|
330
371
|
# Attributes:
|
331
372
|
# * id ( Fixnum ) - ID of the Character that was killed.
|
@@ -353,8 +394,8 @@ module Reve #:nodoc:
|
|
353
394
|
@ship_type_id = elem['shipTypeID'].to_i
|
354
395
|
end
|
355
396
|
end
|
356
|
-
|
357
|
-
# It's possible to be killed/attacked by an NPC. In this case character_id, character_name,
|
397
|
+
|
398
|
+
# It's possible to be killed/attacked by an NPC. In this case character_id, character_name,
|
358
399
|
# alliance_id, alliance_name and weapon_type_id will be nil
|
359
400
|
# Represents an attacker (attacking a KillVictim) in a Kill
|
360
401
|
# Attributes
|
@@ -388,7 +429,7 @@ module Reve #:nodoc:
|
|
388
429
|
@ship_type_id = elem['shipTypeID'].to_i
|
389
430
|
end
|
390
431
|
end
|
391
|
-
|
432
|
+
|
392
433
|
# A model to represent losses from being killed.
|
393
434
|
# Attributes
|
394
435
|
# * type_id ( Fixnum ) - Type ID of the KillLoss. (Refer to CCP database dump invtypes)
|
@@ -405,11 +446,11 @@ module Reve #:nodoc:
|
|
405
446
|
@flag = elem['flag'].to_i
|
406
447
|
@quantity_dropped = elem['qtyDropped'].to_i
|
407
448
|
@quantity_destroyed = elem['qtyDestroyed'].to_i
|
408
|
-
@contained_losses = []
|
449
|
+
@contained_losses = []
|
409
450
|
end
|
410
451
|
end
|
411
|
-
|
412
|
-
|
452
|
+
|
453
|
+
|
413
454
|
# Simple class to contain the information relevant to a single Kill.
|
414
455
|
# Comprised of an array of KillLoss, an array of KillAttacker and one KillVictim
|
415
456
|
# Attributes
|
@@ -431,8 +472,8 @@ module Reve #:nodoc:
|
|
431
472
|
@moon_id = elem['moonID'] == "0" ? nil : elem['moonID'].to_i
|
432
473
|
end
|
433
474
|
end
|
434
|
-
|
435
|
-
|
475
|
+
|
476
|
+
|
436
477
|
# A container or singleton (unpackaged thing).
|
437
478
|
# Attributes
|
438
479
|
# * item_id ( Fixnum ) - A CCP-specific ID for the Asset/AssetContainer
|
@@ -444,7 +485,7 @@ module Reve #:nodoc:
|
|
444
485
|
# * assets ( [Asset] ) - A list of Asset objects that are contained in this AssetContainer.
|
445
486
|
# See Also: Asset, Reve::API#corporate_assets_list, Reve::API#personal_assets_list
|
446
487
|
class AssetContainer
|
447
|
-
attr_reader :item_id, :location_id, :type_id, :quantity, :flag, :singleton, :xml_hash
|
488
|
+
attr_reader :item_id, :location_id, :type_id, :quantity, :flag, :singleton, :rawQuantity, :xml_hash
|
448
489
|
attr_accessor :assets
|
449
490
|
def initialize(elem)
|
450
491
|
@item_id = elem['itemID'].to_i
|
@@ -453,13 +494,14 @@ module Reve #:nodoc:
|
|
453
494
|
@quantity = elem['quantity'].to_i
|
454
495
|
@flag = elem['flag'].to_i
|
455
496
|
@singleton = elem['singleton'] == "1"
|
497
|
+
@rawQuantity = elem['rawQuantity'].to_i
|
456
498
|
@assets = []
|
457
499
|
# This ::Digest::SHA1 is a bit of custom code for Eve Metrics that will
|
458
500
|
# probably find its way to all classes since it could prove handy.
|
459
501
|
@xml_hash = ::Digest::SHA1.hexdigest elem.to_s.gsub(/\n|\r|\s/,'')
|
460
502
|
end
|
461
503
|
end
|
462
|
-
|
504
|
+
|
463
505
|
# An item contained within an AssetContainer (ship, or container)
|
464
506
|
# Attributes
|
465
507
|
# * item_id ( Fixnum ) - A CCP-specific ID for the Asset/AssetContainer
|
@@ -468,13 +510,14 @@ module Reve #:nodoc:
|
|
468
510
|
# * flag ( Fixnum ) - Inventory flag, refer to http://wiki.eve-dev.net/API_Inventory_Flags (See also KillLoss's flag)
|
469
511
|
# See Also: AssetContainer, Reve::API#corporate_assets_list, Reve::API#personal_assets_list
|
470
512
|
class Asset
|
471
|
-
attr_reader :item_id, :type_id, :quantity, :flag, :singleton, :xml_hash
|
513
|
+
attr_reader :item_id, :type_id, :quantity, :flag, :singleton, :rawQuantity, :xml_hash
|
472
514
|
def initialize(elem) #:nodoc:
|
473
515
|
@item_id = elem['itemID'].to_i
|
474
516
|
@type_id = elem['typeID'].to_i
|
475
517
|
@quantity = elem['quantity'].to_i
|
476
518
|
@flag = elem['flag'].to_i
|
477
519
|
@singleton = elem['singleton'].to_i
|
520
|
+
@rawQuantity = elem['rawQuantity'].to_i
|
478
521
|
# This ::Digest::SHA1 is a bit of custom code for Eve Metrics that will
|
479
522
|
# probably find its way to all classes since it could prove handy.
|
480
523
|
@xml_hash = ::Digest::SHA1.hexdigest elem.to_s.gsub(/\n|\r|\s/,'')
|
@@ -483,8 +526,8 @@ module Reve #:nodoc:
|
|
483
526
|
|
484
527
|
# Used for attribute enhancers (in-game Implants)
|
485
528
|
# IntelligenceEnhancer, MemoryEnhancer, PerceptionEnhancer, CharismaEnhancer
|
486
|
-
# and WillpowerEnhancer all subclass this class as this AttributeEnhancer
|
487
|
-
# class is never used (except in a fault-case). Use the kind_of? method
|
529
|
+
# and WillpowerEnhancer all subclass this class as this AttributeEnhancer
|
530
|
+
# class is never used (except in a fault-case). Use the kind_of? method
|
488
531
|
# to determine what kind of AttributeEnhancer one is dealing with.
|
489
532
|
# Attributes
|
490
533
|
# * name ( String ) - The name of the AttributeEnhancer (implant)
|
@@ -502,8 +545,8 @@ module Reve #:nodoc:
|
|
502
545
|
class PerceptionEnhancer < AttributeEnhancer; end
|
503
546
|
class CharismaEnhancer < AttributeEnhancer; end
|
504
547
|
class WillpowerEnhancer < AttributeEnhancer; end
|
505
|
-
|
506
|
-
|
548
|
+
|
549
|
+
|
507
550
|
# Certificate tree container. This looks like:
|
508
551
|
# [CertificateCategory]
|
509
552
|
# [CertificateClass]
|
@@ -516,7 +559,7 @@ module Reve #:nodoc:
|
|
516
559
|
@categories = categories
|
517
560
|
end
|
518
561
|
end
|
519
|
-
|
562
|
+
|
520
563
|
# Category of Certificates.
|
521
564
|
# Attributes:
|
522
565
|
# * id ( Fixnum ) - ID of the CertificateCategory
|
@@ -531,7 +574,7 @@ module Reve #:nodoc:
|
|
531
574
|
@classes = []
|
532
575
|
end
|
533
576
|
end
|
534
|
-
|
577
|
+
|
535
578
|
# A class of Certificates.
|
536
579
|
# Attributes:
|
537
580
|
# * id ( Fixnum ) - ID of the CertificateClass
|
@@ -546,6 +589,7 @@ module Reve #:nodoc:
|
|
546
589
|
@certificates = []
|
547
590
|
end
|
548
591
|
end
|
592
|
+
|
549
593
|
class Certificate
|
550
594
|
attr_reader :id, :grade, :corporation_id, :description
|
551
595
|
attr_accessor :required_skills, :required_certificates
|
@@ -558,6 +602,7 @@ module Reve #:nodoc:
|
|
558
602
|
@required_skills = []
|
559
603
|
end
|
560
604
|
end
|
605
|
+
|
561
606
|
class CertificateRequiredSkill
|
562
607
|
attr_reader :id, :level
|
563
608
|
def initialize(elem)
|
@@ -565,7 +610,7 @@ module Reve #:nodoc:
|
|
565
610
|
@level = elem["level"].to_i
|
566
611
|
end
|
567
612
|
end
|
568
|
-
|
613
|
+
|
569
614
|
class CertificateRequiredCertificate
|
570
615
|
attr_reader :id, :grade
|
571
616
|
def initialize(elem)
|
@@ -573,7 +618,7 @@ module Reve #:nodoc:
|
|
573
618
|
@grade = elem["grade"].to_i
|
574
619
|
end
|
575
620
|
end
|
576
|
-
|
621
|
+
|
577
622
|
# Represents a Character for the Reve::API#characters, Reve::API#character_name and Reve::API#character_id calls.
|
578
623
|
# Attributes
|
579
624
|
# * name ( String ) - Name of the Character
|
@@ -590,7 +635,7 @@ module Reve #:nodoc:
|
|
590
635
|
@corporation_id = elem['corporationID'].to_i
|
591
636
|
end
|
592
637
|
end
|
593
|
-
|
638
|
+
|
594
639
|
|
595
640
|
# Holds the result of the Reve::API#character_sheet call.
|
596
641
|
# This has all of the stuff that appears in the in-game 'character sheet'
|
@@ -606,10 +651,10 @@ module Reve #:nodoc:
|
|
606
651
|
# * corporation_id ( Fixnum ) - ID of the Corporation the Character is in
|
607
652
|
# * balance ( Float ) - How much ISK the Character has
|
608
653
|
# * intelligence ( Fixnum ) - Character's Intelligence level
|
609
|
-
# * memory ( Fixnum ) -
|
610
|
-
# * charisma ( Fixnum ) -
|
611
|
-
# * perception ( Fixnum ) -
|
612
|
-
# * willpower ( Fixnum ) -
|
654
|
+
# * memory ( Fixnum ) -
|
655
|
+
# * charisma ( Fixnum ) -
|
656
|
+
# * perception ( Fixnum ) -
|
657
|
+
# * willpower ( Fixnum ) -
|
613
658
|
# * skills ( [Skill] ) - An Array of Skill objects that the Character has trained.
|
614
659
|
# * enhancers ( [AttributeEnhancer] ) - An Array of any implants (AttributeEnhancer) the Character has in its head.
|
615
660
|
# See Also: Reve::API#character_sheet, AttributeEnhancer (and subclasses), Skill
|
@@ -649,19 +694,19 @@ module Reve #:nodoc:
|
|
649
694
|
@corporation_id = i.to_i
|
650
695
|
end
|
651
696
|
end
|
652
|
-
|
697
|
+
|
653
698
|
# Holds the result of the Reve::API#corporate_member_security call.
|
654
699
|
# Attributes
|
655
700
|
# * members ( [CorporationMember] ) - Array of CorporationMember
|
656
701
|
# See Also: CorporationMember, CorporateRole, CorporateTitle
|
657
702
|
class CorporationMemberSecurity
|
658
703
|
attr_accessor :members
|
659
|
-
|
704
|
+
|
660
705
|
def initialize
|
661
706
|
@members = []
|
662
707
|
end
|
663
708
|
end
|
664
|
-
|
709
|
+
|
665
710
|
# Part of the CorporationMemberSecurity; represnets a Corporation's member
|
666
711
|
# All of these values are internal to CCP; +shape_1+ matches with +color_1+ and so on.
|
667
712
|
# Attributes
|
@@ -672,18 +717,18 @@ module Reve #:nodoc:
|
|
672
717
|
attr_accessor :roles, :grantableRoles, :rolesAtHQ, :grantableRolesAtHQ, :rolesAtBase
|
673
718
|
attr_accessor :grantableRolesAtBase, :rolesAtOther, :grantableRolesAtOther, :titles
|
674
719
|
attr_accessor :id, :name
|
675
|
-
|
720
|
+
|
676
721
|
alias_method :roles_at_hq, :rolesAtHQ
|
677
722
|
alias_method :grantable_roles_at_hq, :grantableRolesAtHQ
|
678
723
|
alias_method :roles_at_base, :rolesAtBase
|
679
724
|
alias_method :grantable_roles_at_base, :grantableRolesAtBase
|
680
725
|
alias_method :roles_at_other, :rolesAtOther
|
681
726
|
alias_method :grantable_roles_at_other, :grantableRolesAtOther
|
682
|
-
|
727
|
+
|
683
728
|
def initialize(elem) #:nodoc:
|
684
729
|
@id = elem['characterID'].to_i
|
685
730
|
@name = elem['name']
|
686
|
-
|
731
|
+
|
687
732
|
@roles = []
|
688
733
|
@grantableRoles = []
|
689
734
|
@rolesAtHQ = []
|
@@ -695,7 +740,7 @@ module Reve #:nodoc:
|
|
695
740
|
@titles = []
|
696
741
|
end
|
697
742
|
end
|
698
|
-
|
743
|
+
|
699
744
|
# Holds the result of the Reve::API#conqurable_stations call.
|
700
745
|
# Attributes
|
701
746
|
# * id ( Fixnum ) - ID of the ConqurableStation
|
@@ -717,12 +762,12 @@ module Reve #:nodoc:
|
|
717
762
|
end
|
718
763
|
end
|
719
764
|
class ConquerableStation < ConqurableStation; end
|
720
|
-
|
765
|
+
|
721
766
|
# Part of the CorporationSheet; represnets a Corporation's in-game logo
|
722
767
|
# All of these values are internal to CCP; +shape_1+ matches with +color_1+ and so on.
|
723
768
|
# Attributes
|
724
|
-
# * graphic_id ( Fixnum )
|
725
|
-
# * shape_1 ( Fixnum )
|
769
|
+
# * graphic_id ( Fixnum )
|
770
|
+
# * shape_1 ( Fixnum )
|
726
771
|
# * shape_2 ( Fixnum )
|
727
772
|
# * shape_3 ( Fixnum )
|
728
773
|
# * color_1 ( Fixnum )
|
@@ -737,11 +782,11 @@ module Reve #:nodoc:
|
|
737
782
|
@shape_3 = elem['shape3'].to_i
|
738
783
|
@color_1 = elem['color1'].to_i
|
739
784
|
@color_2 = elem['color2'].to_i
|
740
|
-
@color_3 = elem['color3'].to_i
|
741
|
-
end
|
785
|
+
@color_3 = elem['color3'].to_i
|
786
|
+
end
|
742
787
|
end
|
743
|
-
|
744
|
-
|
788
|
+
|
789
|
+
|
745
790
|
# Part of the CharacterSheet; represents a grantable Corporation role to a
|
746
791
|
# Character.
|
747
792
|
# Attributes:
|
@@ -754,7 +799,7 @@ module Reve #:nodoc:
|
|
754
799
|
@name = elem['roleName']
|
755
800
|
end
|
756
801
|
end
|
757
|
-
|
802
|
+
|
758
803
|
# Part of the CharacterSheet; represents a grantable Corporation title to a
|
759
804
|
# Character.
|
760
805
|
# Attributes:
|
@@ -767,7 +812,7 @@ module Reve #:nodoc:
|
|
767
812
|
@name = elem['titleName']
|
768
813
|
end
|
769
814
|
end
|
770
|
-
|
815
|
+
|
771
816
|
# Part of the CorporationSheet. Describes a division in the wallet
|
772
817
|
# Attributes
|
773
818
|
# * key ( Fixnum ) - Account key. Used for things like WalletBalance and such.
|
@@ -780,7 +825,7 @@ module Reve #:nodoc:
|
|
780
825
|
@description = elem['description'].split(/\n/).collect { |s| s.strip }.join(' ') # newlines to spaces
|
781
826
|
end
|
782
827
|
end
|
783
|
-
|
828
|
+
|
784
829
|
# Part of the CorporationSheet. Describes a division of the Corporation
|
785
830
|
# Attributes
|
786
831
|
# * key ( Fixnum ) - Account key.
|
@@ -793,7 +838,7 @@ module Reve #:nodoc:
|
|
793
838
|
@description = elem['description'].split(/\n/).collect { |s| s.strip }.join(' ') # newlines to spaces
|
794
839
|
end
|
795
840
|
end
|
796
|
-
|
841
|
+
|
797
842
|
# Describes a Corporation. The public listing when a Corporation is in an Alliance is limited. When the requestor is in the Corporation for which the CorporationSheet is for then the details are full.
|
798
843
|
# Attributes
|
799
844
|
# * id ( Fixnum ) - ID of the Corporation
|
@@ -819,7 +864,7 @@ module Reve #:nodoc:
|
|
819
864
|
attr_reader :id, :name, :ticker, :ceo_id, :ceo_name, :station_id, :station_name, :description, :url,
|
820
865
|
:alliance_id, :alliance_name, :tax_rate, :member_count, :member_limit, :shares
|
821
866
|
attr_accessor :divisions, :wallet_divisions, :logo
|
822
|
-
|
867
|
+
|
823
868
|
# Call it +h+ here cos it's a Hash and not any Hpricot object like in other constructors
|
824
869
|
def initialize(h, divisions = [],wallet_divisions = [], logo =Reve::Classes::CorporateLogo.new(Hash.new(0)) ) #:nodoc:
|
825
870
|
@divisions = divisions
|
@@ -840,9 +885,9 @@ module Reve #:nodoc:
|
|
840
885
|
@member_count = h[:member_count].to_i
|
841
886
|
@member_limit = h[:member_limit].to_i
|
842
887
|
@shares = h[:shares].to_i
|
843
|
-
end
|
888
|
+
end
|
844
889
|
end
|
845
|
-
|
890
|
+
|
846
891
|
# This is just for getting the list and writing to test/xml/errors
|
847
892
|
class APIError #:nodoc:
|
848
893
|
attr_reader :code, :text
|
@@ -851,8 +896,8 @@ module Reve #:nodoc:
|
|
851
896
|
@text = elem['errorText']
|
852
897
|
end
|
853
898
|
end
|
854
|
-
|
855
|
-
|
899
|
+
|
900
|
+
|
856
901
|
# Container for the CharacterMedal since there's two kinds returned in XML
|
857
902
|
# Attributes:
|
858
903
|
# * current_corporation ( [ CharacterMedal ] ) - Array of CharacterMedal for the Corporation this Character is currently in
|
@@ -863,9 +908,9 @@ module Reve #:nodoc:
|
|
863
908
|
def initialize(current, other)
|
864
909
|
@current_corporation = current
|
865
910
|
@other_corporation = other
|
866
|
-
end
|
911
|
+
end
|
867
912
|
end
|
868
|
-
|
913
|
+
|
869
914
|
# Parent class for Medals
|
870
915
|
# Attributes:
|
871
916
|
# * id ( Fixnum ) - ID for the Medal
|
@@ -878,7 +923,7 @@ module Reve #:nodoc:
|
|
878
923
|
@issued_at = elem["issued"].to_time
|
879
924
|
end
|
880
925
|
end
|
881
|
-
|
926
|
+
|
882
927
|
# Composed in CharacterMedals. Issued by the Corporation the Character is a member
|
883
928
|
# Attributes:
|
884
929
|
# * reason ( String ) - Why the CharacterMedal was issued
|
@@ -902,7 +947,7 @@ module Reve #:nodoc:
|
|
902
947
|
! is_public?
|
903
948
|
end
|
904
949
|
end
|
905
|
-
|
950
|
+
|
906
951
|
# Composed in CharacterMedals. Issued by the Corporation the Character is a member
|
907
952
|
# Attributes:
|
908
953
|
# * corporation_id ( Fixnum ) - ID of the Corporation that issued the CharacterOtherCorporateMedal
|
@@ -916,9 +961,9 @@ module Reve #:nodoc:
|
|
916
961
|
@corporation_id = elem["corporationID"].to_i
|
917
962
|
@title = elem["title"]
|
918
963
|
@description = elem["description"]
|
919
|
-
end
|
964
|
+
end
|
920
965
|
end
|
921
|
-
|
966
|
+
|
922
967
|
# All of the Medals that the members of a Corporation have.
|
923
968
|
# Attributes:
|
924
969
|
# * character_id ( Fixnum ) - ID of the Character that has this CorporateMemberMedal
|
@@ -944,14 +989,14 @@ module Reve #:nodoc:
|
|
944
989
|
! is_public?
|
945
990
|
end
|
946
991
|
end
|
947
|
-
|
992
|
+
|
948
993
|
# The medals a Corporation can give out.
|
949
994
|
# Attributes
|
950
995
|
# * title ( String ) - Title that this CorporateMedal gives
|
951
996
|
# * creator_id ( Fixnum ) - Who created the CorporateMedal
|
952
997
|
# * description ( String ) Description of the CorporateMedal
|
953
998
|
# * created_at ( Time ) - When the CorporateMedal was created.
|
954
|
-
# See Also: Medal, CharacterMedal, CharacterOtherCorporateMedal, CorporateMemberMedal,
|
999
|
+
# See Also: Medal, CharacterMedal, CharacterOtherCorporateMedal, CorporateMemberMedal,
|
955
1000
|
class CorporateMedal < Medal
|
956
1001
|
attr_reader :title, :creator_id, :description, :created_at
|
957
1002
|
def initialize(elem) #:nodoc:
|
@@ -962,7 +1007,7 @@ module Reve #:nodoc:
|
|
962
1007
|
@created_at = elem["created"].to_time
|
963
1008
|
end
|
964
1009
|
end
|
965
|
-
|
1010
|
+
|
966
1011
|
# Used for the Reve::API#map_jumps method. If there are no jumps it is not listed.
|
967
1012
|
# Attributes
|
968
1013
|
# * system_id ( Fixnum ) - ID of the System
|
@@ -975,7 +1020,7 @@ module Reve #:nodoc:
|
|
975
1020
|
@jumps = elem['shipJumps'].to_i
|
976
1021
|
end
|
977
1022
|
end
|
978
|
-
|
1023
|
+
|
979
1024
|
# Used for the Reve::API#personal_market_orders and Reve::API#corporate_market_orders
|
980
1025
|
# Each of those derrive from this parent class.
|
981
1026
|
# Attributes
|
@@ -1029,10 +1074,11 @@ module Reve #:nodoc:
|
|
1029
1074
|
@created_at = elem['issued'].to_time
|
1030
1075
|
end
|
1031
1076
|
end
|
1077
|
+
|
1032
1078
|
class PersonalMarketOrder < MarketOrder; end
|
1033
1079
|
class CorporateMarketOrder < MarketOrder; end
|
1034
|
-
|
1035
|
-
|
1080
|
+
|
1081
|
+
|
1036
1082
|
# Used in Reve::API#personal_industry_jobs and Reve::API#corporate_industry_jobs. PersonalIndustryJob and CorporateIndustryJob
|
1037
1083
|
# subclass this for more logical containment.
|
1038
1084
|
# These attributes should be largely self-explanatory. There are so many of them that it's soulcrushing to document each one! (Sorry ;)
|
@@ -1043,8 +1089,8 @@ module Reve #:nodoc:
|
|
1043
1089
|
:installed_item_licensed_production_runs_remaining, :output_location_id, :installer_id, :runs,
|
1044
1090
|
:licensed_production_runs, :installed_system_id, :container_location_id, :material_multiplier,
|
1045
1091
|
:char_material_multiplier, :time_multiplier, :char_time_multiplier, :installed_item_type_id,
|
1046
|
-
:output_type_id, :container_type_id, :installed_item_copy, :completed, :completed_successfully,
|
1047
|
-
:installed_item_flag, :output_flag, :activity_id, :completed_status, :installed_at,
|
1092
|
+
:output_type_id, :container_type_id, :installed_item_copy, :completed, :completed_successfully,
|
1093
|
+
:installed_item_flag, :output_flag, :activity_id, :completed_status, :installed_at,
|
1048
1094
|
:begin_production_at, :end_production_at, :pause_production_time
|
1049
1095
|
def initialize(elem) #:nodoc:
|
1050
1096
|
@id = elem['jobID'].to_i; @assembly_line_id = elem['assemblyLineID'].to_i ; @container_id = elem['containerID'].to_i
|
@@ -1068,9 +1114,10 @@ module Reve #:nodoc:
|
|
1068
1114
|
@pause_production_time = elem['pauseProductionTime'].to_time
|
1069
1115
|
end
|
1070
1116
|
end
|
1117
|
+
|
1071
1118
|
class PersonalIndustryJob < IndustryJob; end
|
1072
1119
|
class CorporateIndustryJob < IndustryJob; end
|
1073
|
-
|
1120
|
+
|
1074
1121
|
# Used for the Reve::API#map_kills method. If there are no kills it's not listed.
|
1075
1122
|
# Attributes
|
1076
1123
|
# * system_id ( Fixnum ) - ID of the System
|
@@ -1080,12 +1127,12 @@ module Reve #:nodoc:
|
|
1080
1127
|
# See also Reve::API#map_kills, MapJump
|
1081
1128
|
class MapKill
|
1082
1129
|
attr_reader :system_id, :ship_kills, :faction_kills, :pod_kills
|
1083
|
-
def initialize(elem) #:nodoc:
|
1130
|
+
def initialize(elem) #:nodoc:
|
1084
1131
|
@system_id = elem['solarSystemID'].to_i
|
1085
1132
|
@ship_kills = elem['shipKills'].to_i
|
1086
1133
|
@faction_kills = elem['factionKills'].to_i
|
1087
1134
|
@pod_kills = elem['podKills'].to_i
|
1088
|
-
end
|
1135
|
+
end
|
1089
1136
|
end
|
1090
1137
|
|
1091
1138
|
# Holds the result of the Reve::API#member_tracking call for big brother.
|
@@ -1105,7 +1152,7 @@ module Reve #:nodoc:
|
|
1105
1152
|
# * grantable_roles ( String ) - List of grantable roles for the Character
|
1106
1153
|
# See Also: Reve::API#member_tracking
|
1107
1154
|
class MemberTracking
|
1108
|
-
attr_reader :character_id, :character_name, :start_time, :base_id, :base, :title, :logon_time, :logoff_time,
|
1155
|
+
attr_reader :character_id, :character_name, :start_time, :base_id, :base, :title, :logon_time, :logoff_time,
|
1109
1156
|
:location_id, :location, :ship_type_id, :ship_type, :roles, :grantable_roles
|
1110
1157
|
def initialize(elem) #:nodoc:
|
1111
1158
|
@character_id = elem['characterID'].to_i
|
@@ -1137,7 +1184,7 @@ module Reve #:nodoc:
|
|
1137
1184
|
@name = elem['refTypeName']
|
1138
1185
|
end
|
1139
1186
|
end
|
1140
|
-
|
1187
|
+
|
1141
1188
|
# ServerStatus object. Simple
|
1142
1189
|
# Attributes:
|
1143
1190
|
# * open ( Boolean ) - true if the server is up, false if it's down
|
@@ -1181,7 +1228,7 @@ module Reve #:nodoc:
|
|
1181
1228
|
@value = elem['bonusValue']
|
1182
1229
|
end
|
1183
1230
|
end
|
1184
|
-
|
1231
|
+
|
1185
1232
|
# A SkillRequirement, for SkillTree and Reve::API#skill_tree
|
1186
1233
|
# Attributes
|
1187
1234
|
# * type_id ( Fixnum ) - ID of the Skill that is the SkillRequirement (Refer to CCP database dump invtypes)
|
@@ -1272,7 +1319,7 @@ module Reve #:nodoc:
|
|
1272
1319
|
@to_level = elem['level'].to_i
|
1273
1320
|
end
|
1274
1321
|
end
|
1275
|
-
|
1322
|
+
|
1276
1323
|
# Used for the Reve::API#sovereignty call.
|
1277
1324
|
# Attributes
|
1278
1325
|
# * system_id ( Fixnum ) - ID of the System
|
@@ -1293,7 +1340,7 @@ module Reve #:nodoc:
|
|
1293
1340
|
@system_name = elem['solarSystemName']
|
1294
1341
|
end
|
1295
1342
|
end
|
1296
|
-
|
1343
|
+
|
1297
1344
|
# Used for a list of Starbases, Reve::API#starbases
|
1298
1345
|
# Attributes
|
1299
1346
|
# * type_id ( Fixnum ) - Type of Starbase (Refer to CCP database dump invtypes)
|
@@ -1318,7 +1365,7 @@ module Reve #:nodoc:
|
|
1318
1365
|
@online_timestamp = elem['onlineTimestamp'].to_time
|
1319
1366
|
end
|
1320
1367
|
end
|
1321
|
-
|
1368
|
+
|
1322
1369
|
# Returns the starbase details for the Starbase whose item id is starbase_id
|
1323
1370
|
# Attributes
|
1324
1371
|
# * state ( Fixnum ) - State of the starbase (Refer to CCP database dump invtypes)
|
@@ -1331,7 +1378,7 @@ module Reve #:nodoc:
|
|
1331
1378
|
class StarbaseDetails
|
1332
1379
|
attr_reader :state, :state_timestamp, :online_timestamp
|
1333
1380
|
attr_accessor :general_settings, :combat_settings, :fuel
|
1334
|
-
|
1381
|
+
|
1335
1382
|
def initialize(elem, general_settings, combat_settings, fuel) #:nodoc:
|
1336
1383
|
@state = elem[:state].to_i
|
1337
1384
|
@state_timestamp = elem[:state_timestamp].to_time
|
@@ -1341,7 +1388,7 @@ module Reve #:nodoc:
|
|
1341
1388
|
@fuel = fuel
|
1342
1389
|
end
|
1343
1390
|
end
|
1344
|
-
|
1391
|
+
|
1345
1392
|
class StarbaseGeneralSettings
|
1346
1393
|
attr_reader :usage_flags, :deploy_flags, :allow_corporation_members,
|
1347
1394
|
:allow_alliance_members, :claim_sovereignty
|
@@ -1353,7 +1400,7 @@ module Reve #:nodoc:
|
|
1353
1400
|
@claim_sovereignty = elem['claimSovereignty'] == '1'
|
1354
1401
|
end
|
1355
1402
|
end
|
1356
|
-
|
1403
|
+
|
1357
1404
|
class StarbaseCombatSettings
|
1358
1405
|
attr_reader :on_standings_drop, :on_status_drop, :on_aggression, :on_corporation_war
|
1359
1406
|
def initialize(elem) #:nodoc:
|
@@ -1363,7 +1410,7 @@ module Reve #:nodoc:
|
|
1363
1410
|
@on_corporation_war = elem['onCorporationWar'].attr('enabled') == '1'
|
1364
1411
|
end
|
1365
1412
|
end
|
1366
|
-
|
1413
|
+
|
1367
1414
|
class StarbaseFuel
|
1368
1415
|
attr_reader :type_id, :quantity
|
1369
1416
|
def initialize(elem) #:nodoc:
|
@@ -1388,7 +1435,7 @@ module Reve #:nodoc:
|
|
1388
1435
|
end
|
1389
1436
|
end
|
1390
1437
|
# Corporation or Character WalletJournal for
|
1391
|
-
# Reve::API#personal_wallet_journal and
|
1438
|
+
# Reve::API#personal_wallet_journal and
|
1392
1439
|
# Reve::API#corporate_wallet_journal
|
1393
1440
|
# Attributes:
|
1394
1441
|
# * date ( Time ) - Time the action occured
|
@@ -1432,7 +1479,7 @@ module Reve #:nodoc:
|
|
1432
1479
|
# * quantity ( Fixnum ) - Number of +type_id+ transacted
|
1433
1480
|
# * type_name ( String ) - Name of the transacted thing
|
1434
1481
|
# * price ( Float) - Price of the transacted thing
|
1435
|
-
# * client_id ( Fixnum ) - ID of the client
|
1482
|
+
# * client_id ( Fixnum ) - ID of the client
|
1436
1483
|
# * client_name ( String ) - Name of the client
|
1437
1484
|
# * character_id ( Fixnum ) - ID of the Character
|
1438
1485
|
# * station_id ( Fixnum ) - ID of the Station where the WalletTransaction took place
|
@@ -1440,7 +1487,7 @@ module Reve #:nodoc:
|
|
1440
1487
|
# * type ( String ) - Not sure?
|
1441
1488
|
# * transaction_for ( String ) - This is corporate or personal, mirrors the subclasses.
|
1442
1489
|
class WalletTransaction
|
1443
|
-
attr_reader :created_at, :id, :quantity, :type_name, :type_id, :price,
|
1490
|
+
attr_reader :created_at, :id, :quantity, :type_name, :type_id, :price,
|
1444
1491
|
:client_id, :client_name, :character_id, :station_id, :station_name, :type,
|
1445
1492
|
:transaction_for, :character_name
|
1446
1493
|
def initialize(elem) #:nodoc:
|
@@ -1468,7 +1515,7 @@ module Reve #:nodoc:
|
|
1468
1515
|
# See WalletTransaction
|
1469
1516
|
class PersonalWalletTransaction < WalletTransaction
|
1470
1517
|
end
|
1471
|
-
|
1518
|
+
|
1472
1519
|
# Represents a MailingList for
|
1473
1520
|
# Reve::API#personal_mailing_lists
|
1474
1521
|
# Attributes
|
@@ -1479,22 +1526,24 @@ module Reve #:nodoc:
|
|
1479
1526
|
def initialize(elem) #:nodoc:
|
1480
1527
|
@id = elem['listID'].to_i
|
1481
1528
|
@name = elem['displayName']
|
1482
|
-
end
|
1529
|
+
end
|
1483
1530
|
end
|
1484
|
-
|
1531
|
+
|
1485
1532
|
# Represents a MailMessage for
|
1486
1533
|
# Reve::API#personal_mail_messages
|
1487
1534
|
# Attributes
|
1488
|
-
# * id ( Fixnum ) - The unique message ID number.
|
1535
|
+
# * id ( Fixnum ) - The unique message ID number.
|
1489
1536
|
# * sender_id ( Fixnum ) - The character ID of the message originator. (use Reve::API#character_name to get their names)
|
1490
|
-
# * send_date ( Time ) - The date the message was sent.
|
1491
|
-
# * title ( String ) - The title of the message
|
1492
|
-
# * to_corp_or_alliance_id ( Fixnum ) - The ID of a corporation/alliance that the message was sent to.
|
1493
|
-
# * to_character_ids ( [Fixnum] ) - Array of character IDs of the characters that received the message.
|
1537
|
+
# * send_date ( Time ) - The date the message was sent.
|
1538
|
+
# * title ( String ) - The title of the message
|
1539
|
+
# * to_corp_or_alliance_id ( Fixnum ) - The ID of a corporation/alliance that the message was sent to.
|
1540
|
+
# * to_character_ids ( [Fixnum] ) - Array of character IDs of the characters that received the message.
|
1494
1541
|
# * to_list_ids ( [Fixnum] ) - Array of mailing lists that the mail was sent to. (use Reve::API#personal_mailing_lists to get their names)
|
1495
|
-
# * read ( Boolean ) - Whether the mail/notification has been read in the EVE client. This does not change when you get it through the API.
|
1496
1542
|
class MailMessage
|
1497
|
-
attr_reader :id, :name, :sender_id, :send_date, :title, :to_corp_or_alliance_id, :to_character_ids, :to_list_ids
|
1543
|
+
attr_reader :id, :name, :sender_id, :send_date, :title, :to_corp_or_alliance_id, :to_character_ids, :to_list_ids
|
1544
|
+
# Getting the text of a mail message requires a separate Eve API call
|
1545
|
+
# Done in Reve::API#personal_mail_bodies
|
1546
|
+
attr_accessor :body
|
1498
1547
|
def initialize(elem) #:nodoc:
|
1499
1548
|
@id = elem['messageID'].to_i
|
1500
1549
|
@sender_id = elem['senderID'].to_i
|
@@ -1503,18 +1552,35 @@ module Reve #:nodoc:
|
|
1503
1552
|
@to_corp_or_alliance_id = elem['toCorpOrAllianceID'] == '' ? nil : elem['toCorpOrAllianceID'].to_i
|
1504
1553
|
@to_character_ids = elem['toCharacterIDs'] == '' ? nil : elem['toCharacterIDs'].split(',').collect {|id| id.to_i }
|
1505
1554
|
@to_list_ids = elem['toListID'] == '' ? nil : elem['toListID'].split(',').collect {|id| id.to_i }
|
1506
|
-
|
1507
|
-
end
|
1555
|
+
end
|
1508
1556
|
end
|
1509
|
-
|
1557
|
+
|
1558
|
+
|
1559
|
+
#upcoming calendar events
|
1560
|
+
class UpcomingCalendarEvents
|
1561
|
+
attr_reader :id, :name, :owner_ID, :owner_Name, :event_Date, :event_Title, :duration, :importance, :response, :event_Text, :owner_Type_ID
|
1562
|
+
def initialize(elem) #:nodoc:
|
1563
|
+
@id = elem['eventID'].to_i
|
1564
|
+
@owner_ID = elem['ownerID'].to_i
|
1565
|
+
@owner_Name = elem['ownerName']
|
1566
|
+
@event_Date = elem['eventDate'].to_time
|
1567
|
+
@event_Title = elem['eventTitle']
|
1568
|
+
@duration = elem['duration'].to_i
|
1569
|
+
@importance = elem['importance']
|
1570
|
+
@response = elem['response']
|
1571
|
+
@event_Text = elem['eventText']
|
1572
|
+
@owner_Type_ID = elem['ownerTypeID'].to_i
|
1573
|
+
end
|
1574
|
+
end
|
1575
|
+
|
1510
1576
|
# Represents a Notification for
|
1511
1577
|
# Reve::API#personal_notifications
|
1512
1578
|
# Attributes
|
1513
1579
|
# * id ( Fixnum ) - The unique notification ID number.
|
1514
1580
|
# * notification_type_id ( Fixnum ) - The notification type indicates what has happened but not who performed the action in question nor upon whom the action was performed. See http://wiki.eve-id.net/APIv2_Char_Notifications_XML for a list of ids
|
1515
|
-
# * sender_id ( Fixnum ) - TThe ID of the entity that sent the notification.
|
1516
|
-
# * send_date ( Time ) - The ID of the entity that sent the notification.
|
1517
|
-
# * read ( Boolean ) - Whether the notification has been read in the EVE client. This does not change when you get it through the API.
|
1581
|
+
# * sender_id ( Fixnum ) - TThe ID of the entity that sent the notification.
|
1582
|
+
# * send_date ( Time ) - The ID of the entity that sent the notification.
|
1583
|
+
# * read ( Boolean ) - Whether the notification has been read in the EVE client. This does not change when you get it through the API.
|
1518
1584
|
class Notification
|
1519
1585
|
attr_reader :id, :name, :notification_type_id, :sender_id, :send_date, :read
|
1520
1586
|
def initialize(elem) #:nodoc:
|
@@ -1523,9 +1589,9 @@ module Reve #:nodoc:
|
|
1523
1589
|
@sender_id = elem['senderID'].to_i
|
1524
1590
|
@send_date = elem['sentDate'].to_time
|
1525
1591
|
@read = elem['read'] == '1'
|
1526
|
-
end
|
1592
|
+
end
|
1527
1593
|
end
|
1528
|
-
|
1594
|
+
|
1529
1595
|
# Represents a AccountStatus for
|
1530
1596
|
# Reve::API#account_status
|
1531
1597
|
# Attributes
|
@@ -1534,7 +1600,7 @@ module Reve #:nodoc:
|
|
1534
1600
|
# * created_at ( Time ) - DateTime when the account was created.
|
1535
1601
|
# * logon_count ( Fixnum ) - The amount of times the User logged in.
|
1536
1602
|
# * logon_minutes ( Fixnum ) - The amount of minutes the user was logged in.
|
1537
|
-
# GTC buy offers not yet inplemented
|
1603
|
+
# GTC buy offers not yet inplemented
|
1538
1604
|
class AccountStatus
|
1539
1605
|
attr_reader :user_id, :paid_until, :created_at, :logon_count, :logon_minutes
|
1540
1606
|
def initialize(elem) #:nodoc:
|
@@ -1545,7 +1611,7 @@ module Reve #:nodoc:
|
|
1545
1611
|
@logon_minutes = (elem/'logonMinutes').inner_html.to_i
|
1546
1612
|
end
|
1547
1613
|
end
|
1548
|
-
|
1614
|
+
|
1549
1615
|
# Represents a CharacterInfo for
|
1550
1616
|
# Reve::API#character_info
|
1551
1617
|
# Basic Attributes
|
@@ -1562,16 +1628,17 @@ module Reve #:nodoc:
|
|
1562
1628
|
# * security_status ( Float ) - Security status of the Character
|
1563
1629
|
# Limited Attributes
|
1564
1630
|
# * skillpoints ( Fixnum ) - The amount of Skillpoints
|
1565
|
-
# * skill_training_ends ( Time )-
|
1566
|
-
# * ship_name ( String ) -
|
1631
|
+
# * skill_training_ends ( Time )-
|
1632
|
+
# * ship_name ( String ) -
|
1567
1633
|
# * ship_type_id ( Fixnum ) -
|
1568
|
-
# * ship_type_name ( String ) -
|
1634
|
+
# * ship_type_name ( String ) -
|
1569
1635
|
# Full Attributes
|
1570
1636
|
# * last_known_location ( String ) -
|
1571
1637
|
# * acount_balance ( Float )
|
1572
1638
|
class CharacterInfo
|
1573
|
-
attr_reader :id, :name, :race, :bloodline, :corporation_id, :corporation_name, :corporation_date, :alliance_id, :alliance_name, :alliance_date, :
|
1574
|
-
attr_reader :
|
1639
|
+
attr_reader :id, :name, :race, :bloodline, :corporation_id, :corporation_name, :corporation_date, :alliance_id, :alliance_name, :alliance_date, :security_status
|
1640
|
+
attr_reader :skillpoints, :skill_training_ends, :ship_name, :ship_type_id, :ship_type_name
|
1641
|
+
attr_reader :last_known_location, :acount_balance
|
1575
1642
|
|
1576
1643
|
def initialize(elem) #:nodoc:
|
1577
1644
|
@id = (elem/'characterID').inner_html.to_i
|
@@ -1595,7 +1662,8 @@ module Reve #:nodoc:
|
|
1595
1662
|
@last_known_location = (elem/'lastKnownLocation').inner_html == "" ? nil : (elem/'lastKnownLocation').inner_html
|
1596
1663
|
@acount_balance = (elem/'accountBalance').inner_html == "" ? nil : (elem/'accountBalance').inner_html.to_f
|
1597
1664
|
end
|
1598
|
-
|
1665
|
+
|
1666
|
+
|
1599
1667
|
def type
|
1600
1668
|
if self.acount_balance
|
1601
1669
|
return :full
|