eve_online 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -1
- data/Gemfile.lock +3 -7
- data/Gemfile.mutant.lock +20 -24
- data/README.md +208 -52
- data/TODO.md +2 -2
- data/eve_online.gemspec +1 -2
- data/lib/eve_online.rb +62 -35
- data/lib/eve_online/esi/alliance_corporations.rb +1 -1
- data/lib/eve_online/esi/alliances.rb +1 -1
- data/lib/eve_online/esi/ancestries.rb +1 -1
- data/lib/eve_online/esi/base.rb +72 -36
- data/lib/eve_online/esi/bloodlines.rb +1 -1
- data/lib/eve_online/esi/character_assets.rb +0 -4
- data/lib/eve_online/esi/character_assets_locations.rb +43 -0
- data/lib/eve_online/esi/character_assets_names.rb +43 -0
- data/lib/eve_online/esi/character_blueprints.rb +0 -4
- data/lib/eve_online/esi/character_bookmark_folders.rb +0 -4
- data/lib/eve_online/esi/character_bookmarks.rb +0 -4
- data/lib/eve_online/esi/character_implants.rb +1 -1
- data/lib/eve_online/esi/character_killmails_recent.rb +0 -4
- data/lib/eve_online/esi/character_wallet_journal.rb +0 -4
- data/lib/eve_online/esi/corporation_blueprints.rb +0 -4
- data/lib/eve_online/esi/corporation_industry_jobs.rb +0 -4
- data/lib/eve_online/esi/corporation_killmails_recent.rb +0 -4
- data/lib/eve_online/esi/corporation_orders.rb +0 -4
- data/lib/eve_online/esi/dogma_attributes.rb +1 -1
- data/lib/eve_online/esi/dogma_effect.rb +41 -0
- data/lib/eve_online/esi/dogma_effects.rb +19 -0
- data/lib/eve_online/esi/factions.rb +1 -1
- data/lib/eve_online/esi/models/asset_location.rb +23 -0
- data/lib/eve_online/esi/models/asset_name.rb +24 -0
- data/lib/eve_online/esi/models/constellation.rb +4 -15
- data/lib/eve_online/esi/models/dogma_attribute_short.rb +24 -0
- data/lib/eve_online/esi/models/dogma_attributes.rb +21 -0
- data/lib/eve_online/esi/models/dogma_effect.rb +118 -0
- data/lib/eve_online/esi/models/dogma_effect_modifier.rb +44 -0
- data/lib/eve_online/esi/models/dogma_effect_modifiers.rb +21 -0
- data/lib/eve_online/esi/models/dogma_effect_short.rb +24 -0
- data/lib/eve_online/esi/models/dogma_effects.rb +21 -0
- data/lib/eve_online/esi/models/position.rb +29 -0
- data/lib/eve_online/esi/models/type.rb +8 -2
- data/lib/eve_online/esi/races.rb +1 -1
- data/lib/eve_online/esi/universe_constellation.rb +3 -3
- data/lib/eve_online/esi/universe_constellations.rb +1 -1
- data/lib/eve_online/esi/universe_region.rb +1 -1
- data/lib/eve_online/esi/universe_regions.rb +1 -1
- data/lib/eve_online/esi/universe_systems.rb +1 -1
- data/lib/eve_online/esi/universe_type.rb +2 -2
- data/lib/eve_online/esi/universe_types.rb +1 -5
- data/lib/eve_online/esi/war_killmails.rb +0 -4
- data/lib/eve_online/esi/wars.rb +1 -1
- data/lib/eve_online/version.rb +1 -1
- metadata +17 -17
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'forwardable'
|
4
|
+
|
5
|
+
module EveOnline
|
6
|
+
module ESI
|
7
|
+
class DogmaEffect < Base
|
8
|
+
extend Forwardable
|
9
|
+
|
10
|
+
API_ENDPOINT = 'https://esi.evetech.net/v2/dogma/effects/%<effect_id>s/?datasource=%<datasource>s'
|
11
|
+
|
12
|
+
attr_reader :id
|
13
|
+
|
14
|
+
def initialize(options)
|
15
|
+
super
|
16
|
+
|
17
|
+
@id = options.fetch(:id)
|
18
|
+
end
|
19
|
+
|
20
|
+
def_delegators :model, :as_json, :description, :disallow_auto_repeat,
|
21
|
+
:discharge_attribute_id, :display_name,
|
22
|
+
:duration_attribute_id, :effect_category, :effect_id,
|
23
|
+
:electronic_chance, :falloff_attribute_id, :icon_id,
|
24
|
+
:is_assistance, :is_offensive, :is_warp_safe,
|
25
|
+
:name, :post_expression, :pre_expression, :published,
|
26
|
+
:range_attribute_id, :range_chance,
|
27
|
+
:tracking_speed_attribute_id, :modifiers
|
28
|
+
|
29
|
+
def model
|
30
|
+
Models::DogmaEffect.new(response)
|
31
|
+
end
|
32
|
+
memoize :model
|
33
|
+
|
34
|
+
def scope; end
|
35
|
+
|
36
|
+
def url
|
37
|
+
format(API_ENDPOINT, effect_id: id, datasource: datasource)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
class DogmaEffects < Base
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v1/dogma/effects/?datasource=%<datasource>s'
|
7
|
+
|
8
|
+
def effect_ids
|
9
|
+
response
|
10
|
+
end
|
11
|
+
|
12
|
+
def scope; end
|
13
|
+
|
14
|
+
def url
|
15
|
+
format(API_ENDPOINT, datasource: datasource)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class Factions < Base
|
6
|
-
API_ENDPOINT = 'https://esi.evetech.net/v2/universe/factions/?datasource=%<datasource>s
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v2/universe/factions/?datasource=%<datasource>s'
|
7
7
|
|
8
8
|
def factions
|
9
9
|
output = []
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class AssetLocation < Base
|
7
|
+
def as_json
|
8
|
+
{
|
9
|
+
item_id: item_id
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
def item_id
|
14
|
+
options['item_id']
|
15
|
+
end
|
16
|
+
|
17
|
+
def position
|
18
|
+
@position ||= Position.new(options['position'])
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class AssetName < Base
|
7
|
+
def as_json
|
8
|
+
{
|
9
|
+
item_id: item_id,
|
10
|
+
name: name
|
11
|
+
}
|
12
|
+
end
|
13
|
+
|
14
|
+
def item_id
|
15
|
+
options['item_id']
|
16
|
+
end
|
17
|
+
|
18
|
+
def name
|
19
|
+
options['name']
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -8,9 +8,6 @@ module EveOnline
|
|
8
8
|
{
|
9
9
|
constellation_id: constellation_id,
|
10
10
|
name: name,
|
11
|
-
position_x: position_x,
|
12
|
-
position_y: position_y,
|
13
|
-
position_z: position_z,
|
14
11
|
region_id: region_id,
|
15
12
|
systems: systems
|
16
13
|
}
|
@@ -24,18 +21,6 @@ module EveOnline
|
|
24
21
|
options['name']
|
25
22
|
end
|
26
23
|
|
27
|
-
def position_x
|
28
|
-
options['position']['x'] if options['position']
|
29
|
-
end
|
30
|
-
|
31
|
-
def position_y
|
32
|
-
options['position']['y'] if options['position']
|
33
|
-
end
|
34
|
-
|
35
|
-
def position_z
|
36
|
-
options['position']['z'] if options['position']
|
37
|
-
end
|
38
|
-
|
39
24
|
def region_id
|
40
25
|
options['region_id']
|
41
26
|
end
|
@@ -43,6 +28,10 @@ module EveOnline
|
|
43
28
|
def systems
|
44
29
|
options['systems']
|
45
30
|
end
|
31
|
+
|
32
|
+
def position
|
33
|
+
@position ||= Position.new(options['position'])
|
34
|
+
end
|
46
35
|
end
|
47
36
|
end
|
48
37
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class DogmaAttributeShort < Base
|
7
|
+
def as_json
|
8
|
+
{
|
9
|
+
attribute_id: attribute_id,
|
10
|
+
value: value
|
11
|
+
}
|
12
|
+
end
|
13
|
+
|
14
|
+
def attribute_id
|
15
|
+
options['attribute_id']
|
16
|
+
end
|
17
|
+
|
18
|
+
def value
|
19
|
+
options['value']
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class DogmaAttributes < Base
|
7
|
+
def dogma_attributes
|
8
|
+
output = []
|
9
|
+
|
10
|
+
return output if !options.is_a?(Array)
|
11
|
+
|
12
|
+
options.each do |dogma_attribute_short|
|
13
|
+
output << DogmaAttributeShort.new(dogma_attribute_short)
|
14
|
+
end
|
15
|
+
|
16
|
+
output
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,118 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class DogmaEffect < Base
|
7
|
+
def as_json
|
8
|
+
{
|
9
|
+
description: description,
|
10
|
+
disallow_auto_repeat: disallow_auto_repeat,
|
11
|
+
discharge_attribute_id: discharge_attribute_id,
|
12
|
+
display_name: display_name,
|
13
|
+
duration_attribute_id: duration_attribute_id,
|
14
|
+
effect_category: effect_category,
|
15
|
+
effect_id: effect_id,
|
16
|
+
electronic_chance: electronic_chance,
|
17
|
+
falloff_attribute_id: falloff_attribute_id,
|
18
|
+
icon_id: icon_id,
|
19
|
+
is_assistance: is_assistance,
|
20
|
+
is_offensive: is_offensive,
|
21
|
+
is_warp_safe: is_warp_safe,
|
22
|
+
name: name,
|
23
|
+
post_expression: post_expression,
|
24
|
+
pre_expression: pre_expression,
|
25
|
+
published: published,
|
26
|
+
range_attribute_id: range_attribute_id,
|
27
|
+
range_chance: range_chance,
|
28
|
+
tracking_speed_attribute_id: tracking_speed_attribute_id
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
def description
|
33
|
+
options['description']
|
34
|
+
end
|
35
|
+
|
36
|
+
def disallow_auto_repeat
|
37
|
+
options['disallow_auto_repeat']
|
38
|
+
end
|
39
|
+
|
40
|
+
def discharge_attribute_id
|
41
|
+
options['discharge_attribute_id']
|
42
|
+
end
|
43
|
+
|
44
|
+
def display_name
|
45
|
+
options['display_name']
|
46
|
+
end
|
47
|
+
|
48
|
+
def duration_attribute_id
|
49
|
+
options['duration_attribute_id']
|
50
|
+
end
|
51
|
+
|
52
|
+
def effect_category
|
53
|
+
options['effect_category']
|
54
|
+
end
|
55
|
+
|
56
|
+
def effect_id
|
57
|
+
options['effect_id']
|
58
|
+
end
|
59
|
+
|
60
|
+
def electronic_chance
|
61
|
+
options['electronic_chance']
|
62
|
+
end
|
63
|
+
|
64
|
+
def falloff_attribute_id
|
65
|
+
options['falloff_attribute_id']
|
66
|
+
end
|
67
|
+
|
68
|
+
def icon_id
|
69
|
+
options['icon_id']
|
70
|
+
end
|
71
|
+
|
72
|
+
def is_assistance
|
73
|
+
options['is_assistance']
|
74
|
+
end
|
75
|
+
|
76
|
+
def is_offensive
|
77
|
+
options['is_offensive']
|
78
|
+
end
|
79
|
+
|
80
|
+
def is_warp_safe
|
81
|
+
options['is_warp_safe']
|
82
|
+
end
|
83
|
+
|
84
|
+
def name
|
85
|
+
options['name']
|
86
|
+
end
|
87
|
+
|
88
|
+
def post_expression
|
89
|
+
options['post_expression']
|
90
|
+
end
|
91
|
+
|
92
|
+
def pre_expression
|
93
|
+
options['pre_expression']
|
94
|
+
end
|
95
|
+
|
96
|
+
def published
|
97
|
+
options['published']
|
98
|
+
end
|
99
|
+
|
100
|
+
def range_attribute_id
|
101
|
+
options['range_attribute_id']
|
102
|
+
end
|
103
|
+
|
104
|
+
def range_chance
|
105
|
+
options['range_chance']
|
106
|
+
end
|
107
|
+
|
108
|
+
def tracking_speed_attribute_id
|
109
|
+
options['tracking_speed_attribute_id']
|
110
|
+
end
|
111
|
+
|
112
|
+
def modifiers
|
113
|
+
@modifiers ||= DogmaEffectModifiers.new(options['modifiers']).modifiers
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|