eve_online 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.travis.yml +1 -1
- data/README.md +93 -6
- data/eve_online.gemspec +4 -3
- data/lib/eve_online/blueprint.rb +60 -0
- data/lib/eve_online/characters/blueprints.rb +44 -0
- data/lib/eve_online/characters/bookmarks.rb +21 -0
- data/lib/eve_online/characters/skill_in_training.rb +69 -0
- data/lib/eve_online/event.rb +1 -2
- data/lib/eve_online/event_response_object.rb +18 -0
- data/lib/eve_online/server/status.rb +1 -1
- data/lib/eve_online/version.rb +1 -1
- data/lib/eve_online.rb +5 -0
- metadata +13 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62e3a36a2b0c01e845fb903eb99e065a99d7448f
|
4
|
+
data.tar.gz: 374c51aca5bd366501e813d58e13b8e3c2f19ce4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d116d4eef832320fa4171f1e222ddaced26957b31368515373e49c2acdfe664c53dc44e3d57c4e48352309384d8771196b52222a97156c98c86c49a2df381b77
|
7
|
+
data.tar.gz: 4e8bb2ac09a48ccc3a8226a0e75ae5b7df1cf6400d7e4e601bc2a742877d19d31e687379b25eb87543204e83b1de7576c71918f3bb17d2d7fa2a197fb259f2c0
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -41,6 +41,7 @@ Server status:
|
|
41
41
|
|
42
42
|
```ruby
|
43
43
|
status = EveOnline::Server::Status.new
|
44
|
+
|
44
45
|
status.as_json
|
45
46
|
# => {:current_time=>Mon, 23 Nov 2015 18:18:29 UTC +00:00, :cached_until=>Mon, 23 Nov 2015 18:19:44 UTC +00:00, :server_open=>true, :online_players=>25611}
|
46
47
|
|
@@ -58,6 +59,7 @@ key_id = 1234567
|
|
58
59
|
v_code = '9ce9970b18d07586ead3d052e5b83bc8db303171a28a6f754cf35d9e6b66af17'
|
59
60
|
|
60
61
|
account_status = EveOnline::Account::Status.new(key_id, v_code)
|
62
|
+
|
61
63
|
account_status.as_json
|
62
64
|
# => {:current_time=>Mon, 23 Nov 2015 18:53:46 UTC +00:00, :paid_until=>Mon, 28 Dec 2015 18:12:56 UTC +00:00, :create_date=>Fri, 15 Jan 2010 15:11:00 UTC +00:00, :logon_count=>388, :logon_minutes=>15598, :cached_until=>Mon, 23 Nov 2015 19:28:38 UTC +00:00}
|
63
65
|
|
@@ -114,6 +116,7 @@ api_key_info.cached_until # => Mon, 30 Nov 2015 23:05:38 UTC +00:00
|
|
114
116
|
api_key_info.characters.size # => 2
|
115
117
|
|
116
118
|
character = api_key_info.characters.first
|
119
|
+
|
117
120
|
character.as_json
|
118
121
|
# => {:character_id=>90729314, :character_name=>"Green Black", :corporation_id=>1000168, :corporation_name=>"Federal Navy Academy", :alliance_id=>0, :alliance_name=>"", :faction_id=>0, :faction_name=>""}
|
119
122
|
|
@@ -134,6 +137,7 @@ v_code = '9ce9970b18d07586ead3d052e5b83bc8db303171a28a6f754cf35d9e6b66af17'
|
|
134
137
|
character_id = 90729314
|
135
138
|
|
136
139
|
account_balance = EveOnline::Characters::AccountBalance.new(key_id, v_code, character_id)
|
140
|
+
|
137
141
|
account_balance.as_json
|
138
142
|
# => {:account_id=>42763123, :account_key=>1000, :balance=>"5000.00", :current_time=>Wed, 02 Dec 2015 20:29:32 UTC +00:00, :cached_until=>Wed, 02 Dec 2015 20:40:42 UTC +00:00}
|
139
143
|
|
@@ -147,7 +151,53 @@ account_balance.version # => 2
|
|
147
151
|
|
148
152
|
Asset List:
|
149
153
|
```ruby
|
150
|
-
# TODO:
|
154
|
+
# TODO: finish this
|
155
|
+
```
|
156
|
+
|
157
|
+
Blueprints:
|
158
|
+
```ruby
|
159
|
+
key_id = 1234567
|
160
|
+
v_code = '9ce9970b18d07586ead3d052e5b83bc8db303171a28a6f754cf35d9e6b66af17'
|
161
|
+
character_id = 90729314
|
162
|
+
|
163
|
+
blueprints = EveOnline::Characters::Blueprints.new(key_id, v_code, character_id)
|
164
|
+
|
165
|
+
blueprints.current_time # => Sun, 03 Jan 2016 14:36:37 UTC +00:00
|
166
|
+
blueprints.cached_until # => Mon, 04 Jan 2016 02:06:37 UTC +00:00
|
167
|
+
blueprints.version # => 2
|
168
|
+
|
169
|
+
blueprints.blueprints.size # => 4
|
170
|
+
|
171
|
+
bp = blueprints.blueprints.first
|
172
|
+
|
173
|
+
bp.as_json
|
174
|
+
# => {:item_id=>716338097, :location_id=>61000032, :type_id=>1010, :type_name=>"Small Shield Extender I Blueprint", :flag_id=>4, :quantity=>-2, :time_efficiency=>0, :material_efficiency=>10, :runs=>300}
|
175
|
+
|
176
|
+
bp.item_id # => 716338097
|
177
|
+
bp.location_id # => 61000032
|
178
|
+
bp.type_id # => 1010
|
179
|
+
bp.type_name # => "Small Shield Extender I Blueprint"
|
180
|
+
bp.flag_id # => 4
|
181
|
+
bp.quantity # => -2
|
182
|
+
bp.time_efficiency # => 0
|
183
|
+
bp.material_efficiency # => 10
|
184
|
+
bp.runs # => 300
|
185
|
+
```
|
186
|
+
|
187
|
+
Bookmarks:
|
188
|
+
```ruby
|
189
|
+
key_id = 1234567
|
190
|
+
v_code = '9ce9970b18d07586ead3d052e5b83bc8db303171a28a6f754cf35d9e6b66af17'
|
191
|
+
character_id = 90729314
|
192
|
+
|
193
|
+
bookmarks = EveOnline::Characters::Bookmarks.new(key_id, v_code, character_id)
|
194
|
+
|
195
|
+
bookmarks.current_time # => Sun, 03 Jan 2016 14:53:44 UTC +00:00
|
196
|
+
bookmarks.cached_until # => Sun, 03 Jan 2016 15:50:44 UTC +00:00
|
197
|
+
bookmarks.version # => 2
|
198
|
+
|
199
|
+
# TODO: finish this
|
200
|
+
|
151
201
|
```
|
152
202
|
|
153
203
|
Calendar Event Attendees:
|
@@ -167,6 +217,32 @@ cea.version # => 2
|
|
167
217
|
|
168
218
|
````
|
169
219
|
|
220
|
+
Skill In Training:
|
221
|
+
```ruby
|
222
|
+
key_id = 1234567
|
223
|
+
v_code = '9ce9970b18d07586ead3d052e5b83bc8db303171a28a6f754cf35d9e6b66af17'
|
224
|
+
character_id = 90729314
|
225
|
+
|
226
|
+
|
227
|
+
skill_in_training = EveOnline::Characters::SkillInTraining.new(key_id, v_code, character_id)
|
228
|
+
|
229
|
+
skill_in_training.current_time # => Sun, 03 Jan 2016 16:09:15 UTC +00:00
|
230
|
+
skill_in_training.cached_until # => Sun, 03 Jan 2016 16:51:29 UTC +00:00
|
231
|
+
skill_in_training.version # => 2
|
232
|
+
|
233
|
+
skill_in_training.as_json
|
234
|
+
# => {:current_tq_time=>Sun, 03 Jan 2016 16:09:15 UTC +00:00, :training_end_time=>Wed, 13 Jan 2016 16:38:31 UTC +00:00, :training_start_time=>Wed, 23 Dec 2015 11:35:45 UTC +00:00, :training_type_id=>30651, :training_start_sp=>226275, :training_destination_sp=>1280000, :training_to_level=>5, :skill_in_training=>1}
|
235
|
+
|
236
|
+
skill_in_training.current_tq_time # => Sun, 03 Jan 2016 16:09:15 UTC +00:00
|
237
|
+
skill_in_training.training_end_time # => Wed, 13 Jan 2016 16:38:31 UTC +00:00
|
238
|
+
skill_in_training.training_start_time # => Wed, 23 Dec 2015 11:35:45 UTC +00:00
|
239
|
+
skill_in_training.training_type_id # => 30651
|
240
|
+
skill_in_training.training_start_sp # => 226275
|
241
|
+
skill_in_training.training_destination_sp # => 1280000
|
242
|
+
skill_in_training.training_to_level # => 5
|
243
|
+
skill_in_training.skill_in_training # => 1
|
244
|
+
```
|
245
|
+
|
170
246
|
Upcoming Calender Events:
|
171
247
|
```ruby
|
172
248
|
key_id = 1234567
|
@@ -182,8 +258,9 @@ upcoming_events.version # => 2
|
|
182
258
|
upcoming_events.events.size # => 2
|
183
259
|
|
184
260
|
event = upcoming_events.events.first
|
261
|
+
|
185
262
|
event.as_json
|
186
|
-
# => {:event_id=>1234567, :owner_id=>98765432, :owner_name=>"MyCorp", :event_date=>Sat, 26 Dec 2015 19:47:29 UTC +00:00, :event_title=>"Control tower in 99-999", :duration=>60, :importance=>false, :response
|
263
|
+
# => {:event_id=>1234567, :owner_id=>98765432, :owner_name=>"MyCorp", :event_date=>Sat, 26 Dec 2015 19:47:29 UTC +00:00, :event_title=>"Control tower in 99-999", :duration=>60, :importance=>false, :response=>:undecided, :event_text=>"<b>Minmatar Control Tower</b> will run out of fuel and go offline...", :owner_type_id=>2}
|
187
264
|
|
188
265
|
event.event_id # => 1234567
|
189
266
|
event.owner_id # => 98765432
|
@@ -192,7 +269,7 @@ event.event_date # => Sat, 26 Dec 2015 19:47:29 UTC +00:00
|
|
192
269
|
event.event_title # => "Control tower in 99-999"
|
193
270
|
event.duration # => 60
|
194
271
|
event.importance # => false
|
195
|
-
event.response # =>
|
272
|
+
event.response # => :undecided
|
196
273
|
event.event_text # => "<b>Minmatar Control Tower</b> will run out of fuel and go offline..."
|
197
274
|
event.owner_type_id # => 2
|
198
275
|
```
|
@@ -221,6 +298,15 @@ Issue reports and pull requests are welcome on GitHub at https://github.com/biow
|
|
221
298
|
|
222
299
|
## Changelog
|
223
300
|
|
301
|
+
**v0.6.0**
|
302
|
+
|
303
|
+
* Add `EveOnline::EventResponseObject` class for handling EveOnline Event response values
|
304
|
+
* `EveOnline::Event#response` now returns symbols. e.g. `:undecided`
|
305
|
+
* [Character Blueprints](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_blueprints/)
|
306
|
+
* Add `EveOnline::Blueprint` class for handling EveOnline Blueprints
|
307
|
+
* Add basic [Character Bookmarks](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_bookmarks/)
|
308
|
+
* [Characters SkillInTraining](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_skillintraining/)
|
309
|
+
|
224
310
|
**v0.5.0**
|
225
311
|
|
226
312
|
* Add `EveOnline::Event` class for handling EveOnline Events
|
@@ -264,7 +350,7 @@ Issue reports and pull requests are welcome on GitHub at https://github.com/biow
|
|
264
350
|
|
265
351
|
### Api
|
266
352
|
|
267
|
-
- [ ] [Call List (Access Mask reference)
|
353
|
+
- [ ] [Call List (Access Mask reference)](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/api_calllist/)
|
268
354
|
|
269
355
|
----
|
270
356
|
|
@@ -272,7 +358,7 @@ Issue reports and pull requests are welcome on GitHub at https://github.com/biow
|
|
272
358
|
|
273
359
|
- [x] [Account Balance](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_accountbalance/)
|
274
360
|
- [ ] [Asset List](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_assetlist/)
|
275
|
-
- [
|
361
|
+
- [x] [Blueprints](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_blueprints/)
|
276
362
|
- [ ] [Bookmarks](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_bookmarks/)
|
277
363
|
- [ ] [Calendar Event Attendees](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_calendareventattendees/)
|
278
364
|
- [ ] [Character Sheet](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_charactersheet/)
|
@@ -300,7 +386,7 @@ Issue reports and pull requests are welcome on GitHub at https://github.com/biow
|
|
300
386
|
- [ ] [Planetary Pins](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_planetarypins/)
|
301
387
|
- [ ] [Planetary Routes](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_planetaryroutes/)
|
302
388
|
- [ ] [Research](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_research/)
|
303
|
-
- [
|
389
|
+
- [x] [Skill in Training](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_skillintraining/)
|
304
390
|
- [ ] [Skill Queue](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_skillqueue/)
|
305
391
|
- [ ] [Standings (NPC)](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_standings/)
|
306
392
|
- [x] [Upcoming Calendar Events](https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_upcomingcalendarevents/)
|
@@ -393,6 +479,7 @@ Issue reports and pull requests are welcome on GitHub at https://github.com/biow
|
|
393
479
|
- [ ] Access Mask
|
394
480
|
- [ ] Caching
|
395
481
|
- [ ] Test EVE server
|
482
|
+
- [ ] Relax deps to ruby gems (we don't care if they are security problems)
|
396
483
|
|
397
484
|
## License
|
398
485
|
|
data/eve_online.gemspec
CHANGED
@@ -25,8 +25,9 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_development_dependency 'rspec-its'
|
26
26
|
spec.add_development_dependency 'webmock'
|
27
27
|
|
28
|
-
|
28
|
+
# http://weblog.rubyonrails.org/2016/1/25/Rails-5-0-0-beta1-1-4-2-5-1-4-1-14-1-3-2-22-1-and-rails-html-sanitizer-1-0-3-have-been-released/
|
29
|
+
spec.add_runtime_dependency 'activesupport', '>= 4.2.5.1'
|
29
30
|
spec.add_runtime_dependency 'nori', '~> 2.6'
|
30
|
-
# https://github.com/sparklemotion/nokogiri/blob/v1.6.7.
|
31
|
-
spec.add_runtime_dependency 'nokogiri', '>= 1.6.7.
|
31
|
+
# https://github.com/sparklemotion/nokogiri/blob/v1.6.7.2/CHANGELOG.rdoc
|
32
|
+
spec.add_runtime_dependency 'nokogiri', '>= 1.6.7.2'
|
32
33
|
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module EveOnline
|
2
|
+
class Blueprint
|
3
|
+
attr_reader :options
|
4
|
+
|
5
|
+
def initialize(options = {})
|
6
|
+
@options = options
|
7
|
+
end
|
8
|
+
|
9
|
+
def as_json(*args)
|
10
|
+
{
|
11
|
+
item_id: item_id,
|
12
|
+
location_id: location_id,
|
13
|
+
type_id: type_id,
|
14
|
+
type_name: type_name,
|
15
|
+
flag_id: flag_id,
|
16
|
+
quantity: quantity,
|
17
|
+
time_efficiency: time_efficiency,
|
18
|
+
material_efficiency: material_efficiency,
|
19
|
+
runs: runs
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def item_id
|
24
|
+
@item_id ||= options.fetch('@itemID').to_i
|
25
|
+
end
|
26
|
+
|
27
|
+
def location_id
|
28
|
+
@location_id ||= options.fetch('@locationID').to_i
|
29
|
+
end
|
30
|
+
|
31
|
+
def type_id
|
32
|
+
@type_id ||= options.fetch('@typeID').to_i
|
33
|
+
end
|
34
|
+
|
35
|
+
def type_name
|
36
|
+
@type_name ||= options.fetch('@typeName')
|
37
|
+
end
|
38
|
+
|
39
|
+
def flag_id
|
40
|
+
@flag_id ||= options.fetch('@flagID').to_i
|
41
|
+
end
|
42
|
+
|
43
|
+
# TODO: return EvevOnline::Blueprint::Quantity
|
44
|
+
def quantity
|
45
|
+
@quantity ||= options.fetch('@quantity').to_i
|
46
|
+
end
|
47
|
+
|
48
|
+
def time_efficiency
|
49
|
+
@time_efficiency ||= options.fetch('@timeEfficiency').to_i
|
50
|
+
end
|
51
|
+
|
52
|
+
def material_efficiency
|
53
|
+
@material_efficiency ||= options.fetch('@materialEfficiency').to_i
|
54
|
+
end
|
55
|
+
|
56
|
+
def runs
|
57
|
+
@runs ||= options.fetch('@runs').to_i
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module EveOnline
|
2
|
+
module Characters
|
3
|
+
# https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_blueprints/
|
4
|
+
class Blueprints < Base
|
5
|
+
API_ENDPOINT = 'https://api.eveonline.com/char/Blueprints.xml.aspx'
|
6
|
+
|
7
|
+
attr_reader :key_id, :v_code, :character_id
|
8
|
+
|
9
|
+
def initialize(key_id, v_code, character_id)
|
10
|
+
super()
|
11
|
+
@key_id = key_id
|
12
|
+
@v_code = v_code
|
13
|
+
@character_id = character_id
|
14
|
+
end
|
15
|
+
|
16
|
+
def blueprints
|
17
|
+
case row
|
18
|
+
when Hash
|
19
|
+
[EveOnline::Blueprint.new(row)]
|
20
|
+
when Array
|
21
|
+
output = []
|
22
|
+
row.each do |blueprint|
|
23
|
+
output << EveOnline::Blueprint.new(blueprint)
|
24
|
+
end
|
25
|
+
output
|
26
|
+
else
|
27
|
+
raise ArgumentError
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def row
|
32
|
+
@row ||= rowset.fetch('row')
|
33
|
+
end
|
34
|
+
|
35
|
+
def rowset
|
36
|
+
@rowset ||= result.fetch('rowset')
|
37
|
+
end
|
38
|
+
|
39
|
+
def url
|
40
|
+
"#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module EveOnline
|
2
|
+
module Characters
|
3
|
+
# https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_bookmarks/
|
4
|
+
class Bookmarks < Base
|
5
|
+
API_ENDPOINT = 'https://api.eveonline.com/char/Bookmarks.xml.aspx'
|
6
|
+
|
7
|
+
attr_reader :key_id, :v_code, :character_id
|
8
|
+
|
9
|
+
def initialize(key_id, v_code, character_id)
|
10
|
+
super()
|
11
|
+
@key_id = key_id
|
12
|
+
@v_code = v_code
|
13
|
+
@character_id = character_id
|
14
|
+
end
|
15
|
+
|
16
|
+
def url
|
17
|
+
"#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module EveOnline
|
2
|
+
module Characters
|
3
|
+
# https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/char_skillintraining/
|
4
|
+
class SkillInTraining < Base
|
5
|
+
API_ENDPOINT = 'https://api.eveonline.com/char/SkillInTraining.xml.aspx'
|
6
|
+
|
7
|
+
attr_reader :key_id, :v_code, :character_id
|
8
|
+
|
9
|
+
def initialize(key_id, v_code, character_id)
|
10
|
+
super()
|
11
|
+
@key_id = key_id
|
12
|
+
@v_code = v_code
|
13
|
+
@character_id = character_id
|
14
|
+
end
|
15
|
+
|
16
|
+
def as_json(*args)
|
17
|
+
{
|
18
|
+
current_tq_time: current_tq_time,
|
19
|
+
training_end_time: training_end_time,
|
20
|
+
training_start_time: training_start_time,
|
21
|
+
training_type_id: training_type_id,
|
22
|
+
training_start_sp: training_start_sp,
|
23
|
+
training_destination_sp: training_destination_sp,
|
24
|
+
training_to_level: training_to_level,
|
25
|
+
skill_in_training: skill_in_training
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
def current_tq_time
|
30
|
+
@current_tq_time ||= \
|
31
|
+
ActiveSupport::TimeZone['UTC'].parse(result.fetch('currentTQTime'))
|
32
|
+
end
|
33
|
+
|
34
|
+
def training_end_time
|
35
|
+
@training_end_time ||= \
|
36
|
+
ActiveSupport::TimeZone['UTC'].parse(result.fetch('trainingEndTime'))
|
37
|
+
end
|
38
|
+
|
39
|
+
def training_start_time
|
40
|
+
@training_start_time ||= \
|
41
|
+
ActiveSupport::TimeZone['UTC'].parse(result.fetch('trainingStartTime'))
|
42
|
+
end
|
43
|
+
|
44
|
+
def training_type_id
|
45
|
+
@training_type_id ||= result.fetch('trainingTypeID').to_i
|
46
|
+
end
|
47
|
+
|
48
|
+
def training_start_sp
|
49
|
+
@training_start_sp ||= result.fetch('trainingStartSP').to_i
|
50
|
+
end
|
51
|
+
|
52
|
+
def training_destination_sp
|
53
|
+
@training_destination_sp ||= result.fetch('trainingDestinationSP').to_i
|
54
|
+
end
|
55
|
+
|
56
|
+
def training_to_level
|
57
|
+
@training_to_level ||= result.fetch('trainingToLevel').to_i
|
58
|
+
end
|
59
|
+
|
60
|
+
def skill_in_training
|
61
|
+
@skill_in_training ||= result.fetch('skillInTraining').to_i
|
62
|
+
end
|
63
|
+
|
64
|
+
def url
|
65
|
+
"#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
data/lib/eve_online/event.rb
CHANGED
@@ -51,8 +51,7 @@ module EveOnline
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def response
|
54
|
-
|
55
|
-
@response ||= options.fetch('@response')
|
54
|
+
@response ||= EveOnline::EventResponseObject.new(options.fetch('@response')).value
|
56
55
|
end
|
57
56
|
|
58
57
|
def event_text
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module EveOnline
|
2
|
+
class EventResponseObject
|
3
|
+
STATUSES = { 'Undecided' => :undecided, 'Accepted' => :accepted,
|
4
|
+
'Declined' => :declined, 'Tentative' => :tentative }
|
5
|
+
|
6
|
+
attr_reader :input
|
7
|
+
|
8
|
+
def initialize(input)
|
9
|
+
@input = input
|
10
|
+
end
|
11
|
+
|
12
|
+
def value
|
13
|
+
raise ArgumentError unless STATUSES.has_key?(input)
|
14
|
+
|
15
|
+
@value ||= STATUSES.fetch(input)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module EveOnline
|
2
2
|
module Server
|
3
|
-
#
|
3
|
+
# https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/serv_serversstatus/
|
4
4
|
class Status < Base
|
5
5
|
API_ENDPOINT = 'https://api.eveonline.com/Server/ServerStatus.xml.aspx'
|
6
6
|
|
data/lib/eve_online/version.rb
CHANGED
data/lib/eve_online.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
require 'eve_online/version'
|
2
2
|
require 'eve_online/base'
|
3
|
+
require 'eve_online/blueprint'
|
3
4
|
require 'eve_online/character'
|
4
5
|
require 'eve_online/event'
|
6
|
+
require 'eve_online/event_response_object'
|
5
7
|
require 'eve_online/skill'
|
6
8
|
require 'eve_online/skill_group'
|
7
9
|
require 'eve_online/account/api_key_info'
|
@@ -9,11 +11,14 @@ require 'eve_online/account/characters'
|
|
9
11
|
require 'eve_online/account/status'
|
10
12
|
require 'eve_online/characters/account_balance'
|
11
13
|
require 'eve_online/characters/asset_list'
|
14
|
+
require 'eve_online/characters/blueprints'
|
15
|
+
require 'eve_online/characters/bookmarks'
|
12
16
|
require 'eve_online/characters/calendar_event_attendees'
|
13
17
|
require 'eve_online/characters/contact_list'
|
14
18
|
require 'eve_online/characters/contact_notifications'
|
15
19
|
require 'eve_online/characters/character_sheet'
|
16
20
|
require 'eve_online/characters/upcoming_calendar_events'
|
21
|
+
require 'eve_online/characters/skill_in_training'
|
17
22
|
require 'eve_online/eve/skill_tree'
|
18
23
|
require 'eve_online/server/status'
|
19
24
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eve_online
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Zubkov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: activesupport
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 4.2.5.1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 4.2.5.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: nori
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.6.7.
|
117
|
+
version: 1.6.7.2
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.6.7.
|
124
|
+
version: 1.6.7.2
|
125
125
|
description: EveOnline API. XML and CREST.
|
126
126
|
email:
|
127
127
|
- igor.zubkov@gmail.com
|
@@ -144,16 +144,21 @@ files:
|
|
144
144
|
- lib/eve_online/account/characters.rb
|
145
145
|
- lib/eve_online/account/status.rb
|
146
146
|
- lib/eve_online/base.rb
|
147
|
+
- lib/eve_online/blueprint.rb
|
147
148
|
- lib/eve_online/character.rb
|
148
149
|
- lib/eve_online/characters/account_balance.rb
|
149
150
|
- lib/eve_online/characters/asset_list.rb
|
151
|
+
- lib/eve_online/characters/blueprints.rb
|
152
|
+
- lib/eve_online/characters/bookmarks.rb
|
150
153
|
- lib/eve_online/characters/calendar_event_attendees.rb
|
151
154
|
- lib/eve_online/characters/character_sheet.rb
|
152
155
|
- lib/eve_online/characters/contact_list.rb
|
153
156
|
- lib/eve_online/characters/contact_notifications.rb
|
157
|
+
- lib/eve_online/characters/skill_in_training.rb
|
154
158
|
- lib/eve_online/characters/upcoming_calendar_events.rb
|
155
159
|
- lib/eve_online/eve/skill_tree.rb
|
156
160
|
- lib/eve_online/event.rb
|
161
|
+
- lib/eve_online/event_response_object.rb
|
157
162
|
- lib/eve_online/server/status.rb
|
158
163
|
- lib/eve_online/skill.rb
|
159
164
|
- lib/eve_online/skill_group.rb
|