eve_online 0.29.0 → 0.30.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +98 -0
- data/.ruby-version +1 -1
- data/Appraisals +23 -0
- data/CHANGELOG.md +16 -0
- data/Gemfile +7 -10
- data/Gemfile.lock +55 -50
- data/Gemfile.mutant.lock +42 -33
- data/README.md +108 -7
- data/Rakefile +2 -2
- data/eve_online.gemspec +28 -27
- data/lib/eve_online.rb +197 -185
- data/lib/eve_online/esi/alliance.rb +6 -6
- data/lib/eve_online/esi/alliance_corporations.rb +4 -3
- data/lib/eve_online/esi/alliance_icon.rb +5 -4
- data/lib/eve_online/esi/alliances.rb +3 -2
- data/lib/eve_online/esi/base.rb +29 -28
- data/lib/eve_online/esi/character.rb +7 -6
- data/lib/eve_online/esi/character_assets.rb +4 -4
- data/lib/eve_online/esi/character_assets_locations.rb +4 -4
- data/lib/eve_online/esi/character_assets_names.rb +4 -4
- data/lib/eve_online/esi/character_attributes.rb +6 -6
- data/lib/eve_online/esi/character_blueprints.rb +4 -4
- data/lib/eve_online/esi/character_bookmark_folders.rb +4 -4
- data/lib/eve_online/esi/character_bookmarks.rb +4 -4
- data/lib/eve_online/esi/character_calendar.rb +4 -4
- data/lib/eve_online/esi/character_calendar_event.rb +4 -5
- data/lib/eve_online/esi/character_clones.rb +7 -7
- data/lib/eve_online/esi/character_corporation_history.rb +4 -3
- data/lib/eve_online/esi/character_fatigue.rb +5 -5
- data/lib/eve_online/esi/character_implants.rb +3 -3
- data/lib/eve_online/esi/character_industry_jobs.rb +4 -4
- data/lib/eve_online/esi/character_killmails_recent.rb +4 -4
- data/lib/eve_online/esi/character_location.rb +5 -5
- data/lib/eve_online/esi/character_loyalty_points.rb +3 -3
- data/lib/eve_online/esi/character_notifications.rb +3 -3
- data/lib/eve_online/esi/character_online.rb +5 -5
- data/lib/eve_online/esi/character_orders.rb +3 -3
- data/lib/eve_online/esi/character_portrait.rb +5 -4
- data/lib/eve_online/esi/character_ship.rb +4 -4
- data/lib/eve_online/esi/character_skill_queue.rb +3 -3
- data/lib/eve_online/esi/character_skills.rb +7 -7
- data/lib/eve_online/esi/character_standings.rb +3 -3
- data/lib/eve_online/esi/character_wallet.rb +4 -4
- data/lib/eve_online/esi/character_wallet_journal.rb +4 -4
- data/lib/eve_online/esi/corporation.rb +8 -7
- data/lib/eve_online/esi/corporation_alliance_history.rb +4 -3
- data/lib/eve_online/esi/corporation_assets.rb +5 -5
- data/lib/eve_online/esi/corporation_assets_locations.rb +5 -5
- data/lib/eve_online/esi/corporation_assets_names.rb +5 -5
- data/lib/eve_online/esi/corporation_blueprints.rb +5 -5
- data/lib/eve_online/esi/corporation_industry_jobs.rb +5 -5
- data/lib/eve_online/esi/corporation_killmails_recent.rb +5 -5
- data/lib/eve_online/esi/corporation_loyalty_store_offers.rb +4 -3
- data/lib/eve_online/esi/corporation_orders.rb +5 -5
- data/lib/eve_online/esi/dogma_attribute.rb +7 -6
- data/lib/eve_online/esi/dogma_attributes.rb +3 -2
- data/lib/eve_online/esi/dogma_effect.rb +11 -11
- data/lib/eve_online/esi/dogma_effects.rb +3 -2
- data/lib/eve_online/esi/market_group.rb +39 -0
- data/lib/eve_online/esi/market_groups.rb +20 -0
- data/lib/eve_online/esi/market_history.rb +5 -4
- data/lib/eve_online/esi/models/aggressor.rb +34 -0
- data/lib/eve_online/esi/models/alliance.rb +8 -8
- data/lib/eve_online/esi/models/alliance_icon.rb +3 -3
- data/lib/eve_online/esi/models/alliance_short.rb +3 -3
- data/lib/eve_online/esi/models/allies.rb +21 -0
- data/lib/eve_online/esi/models/ally.rb +24 -0
- data/lib/eve_online/esi/models/ancestry.rb +7 -7
- data/lib/eve_online/esi/models/asset.rb +9 -9
- data/lib/eve_online/esi/models/asset_location.rb +3 -3
- data/lib/eve_online/esi/models/asset_name.rb +3 -3
- data/lib/eve_online/esi/models/asteroid_belt.rb +4 -4
- data/lib/eve_online/esi/models/attributes.rb +9 -9
- data/lib/eve_online/esi/models/base.rb +2 -2
- data/lib/eve_online/esi/models/bloodline.rb +12 -12
- data/lib/eve_online/esi/models/blueprint.rb +9 -9
- data/lib/eve_online/esi/models/bookmark.rb +11 -11
- data/lib/eve_online/esi/models/bookmark_folder.rb +3 -3
- data/lib/eve_online/esi/models/category.rb +5 -5
- data/lib/eve_online/esi/models/character.rb +13 -13
- data/lib/eve_online/esi/models/character_corporation_history.rb +5 -5
- data/lib/eve_online/esi/models/character_industry_job.rb +23 -23
- data/lib/eve_online/esi/models/character_location.rb +4 -4
- data/lib/eve_online/esi/models/character_order.rb +15 -15
- data/lib/eve_online/esi/models/character_portrait.rb +5 -5
- data/lib/eve_online/esi/models/character_ship.rb +4 -4
- data/lib/eve_online/esi/models/constellation.rb +6 -6
- data/lib/eve_online/esi/models/coordinates.rb +4 -4
- data/lib/eve_online/esi/models/corporation.rb +15 -15
- data/lib/eve_online/esi/models/corporation_alliance_history.rb +5 -5
- data/lib/eve_online/esi/models/corporation_industry_job.rb +23 -23
- data/lib/eve_online/esi/models/corporation_order.rb +16 -16
- data/lib/eve_online/esi/models/defender.rb +34 -0
- data/lib/eve_online/esi/models/dogma_attribute.rb +11 -11
- data/lib/eve_online/esi/models/dogma_attribute_short.rb +3 -3
- data/lib/eve_online/esi/models/dogma_attributes.rb +1 -1
- data/lib/eve_online/esi/models/dogma_effect.rb +22 -22
- data/lib/eve_online/esi/models/dogma_effect_modifier.rb +7 -7
- data/lib/eve_online/esi/models/dogma_effect_modifiers.rb +1 -1
- data/lib/eve_online/esi/models/dogma_effect_short.rb +3 -3
- data/lib/eve_online/esi/models/dogma_effects.rb +1 -1
- data/lib/eve_online/esi/models/event.rb +6 -6
- data/lib/eve_online/esi/models/event_details.rb +11 -11
- data/lib/eve_online/esi/models/faction.rb +11 -11
- data/lib/eve_online/esi/models/fatigue.rb +4 -4
- data/lib/eve_online/esi/models/graphic.rb +9 -9
- data/lib/eve_online/esi/models/group.rb +6 -6
- data/lib/eve_online/esi/models/home_location.rb +3 -3
- data/lib/eve_online/esi/models/jump_clone.rb +6 -6
- data/lib/eve_online/esi/models/killmail_short.rb +3 -3
- data/lib/eve_online/esi/models/loyalty_point.rb +3 -3
- data/lib/eve_online/esi/models/loyalty_store_offer.rb +10 -9
- data/lib/eve_online/esi/models/market_group.rb +38 -0
- data/lib/eve_online/esi/models/market_history.rb +7 -7
- data/lib/eve_online/esi/models/moon.rb +5 -5
- data/lib/eve_online/esi/models/notification.rb +8 -8
- data/lib/eve_online/esi/models/offer_required_item.rb +24 -0
- data/lib/eve_online/esi/models/offer_required_items.rb +21 -0
- data/lib/eve_online/esi/models/online.rb +5 -5
- data/lib/eve_online/esi/models/planet.rb +6 -6
- data/lib/eve_online/esi/models/planet_short.rb +4 -4
- data/lib/eve_online/esi/models/position.rb +4 -4
- data/lib/eve_online/esi/models/race.rb +5 -5
- data/lib/eve_online/esi/models/region.rb +5 -5
- data/lib/eve_online/esi/models/server_status.rb +5 -5
- data/lib/eve_online/esi/models/skill.rb +5 -5
- data/lib/eve_online/esi/models/skill_queue_entry.rb +9 -9
- data/lib/eve_online/esi/models/standing.rb +4 -4
- data/lib/eve_online/esi/models/star.rb +9 -9
- data/lib/eve_online/esi/models/stargate.rb +7 -7
- data/lib/eve_online/esi/models/stargate_destination.rb +3 -3
- data/lib/eve_online/esi/models/station.rb +13 -13
- data/lib/eve_online/esi/models/system.rb +11 -11
- data/lib/eve_online/esi/models/system_jump.rb +3 -3
- data/lib/eve_online/esi/models/system_kill.rb +5 -5
- data/lib/eve_online/esi/models/type.rb +17 -17
- data/lib/eve_online/esi/models/wallet_journal_entry.rb +14 -14
- data/lib/eve_online/esi/models/war.rb +69 -0
- data/lib/eve_online/esi/server_status.rb +4 -3
- data/lib/eve_online/esi/universe_ancestries.rb +4 -3
- data/lib/eve_online/esi/universe_asteroid_belt.rb +5 -4
- data/lib/eve_online/esi/universe_bloodlines.rb +4 -3
- data/lib/eve_online/esi/universe_categories.rb +3 -2
- data/lib/eve_online/esi/universe_category.rb +7 -6
- data/lib/eve_online/esi/universe_constellation.rb +7 -6
- data/lib/eve_online/esi/universe_constellations.rb +3 -2
- data/lib/eve_online/esi/universe_factions.rb +4 -3
- data/lib/eve_online/esi/universe_graphic.rb +7 -6
- data/lib/eve_online/esi/universe_graphics.rb +3 -2
- data/lib/eve_online/esi/universe_group.rb +7 -6
- data/lib/eve_online/esi/universe_groups.rb +4 -3
- data/lib/eve_online/esi/universe_moon.rb +5 -4
- data/lib/eve_online/esi/universe_planet.rb +6 -5
- data/lib/eve_online/esi/universe_races.rb +4 -3
- data/lib/eve_online/esi/universe_region.rb +7 -6
- data/lib/eve_online/esi/universe_regions.rb +3 -2
- data/lib/eve_online/esi/universe_star.rb +6 -6
- data/lib/eve_online/esi/universe_stargate.rb +6 -5
- data/lib/eve_online/esi/universe_station.rb +8 -7
- data/lib/eve_online/esi/universe_structures.rb +4 -3
- data/lib/eve_online/esi/universe_system.rb +8 -7
- data/lib/eve_online/esi/universe_system_jumps.rb +3 -2
- data/lib/eve_online/esi/universe_system_kills.rb +3 -2
- data/lib/eve_online/esi/universe_systems.rb +3 -2
- data/lib/eve_online/esi/universe_type.rb +9 -8
- data/lib/eve_online/esi/universe_types.rb +4 -3
- data/lib/eve_online/esi/war.rb +35 -0
- data/lib/eve_online/esi/war_killmails.rb +5 -4
- data/lib/eve_online/esi/wars.rb +4 -3
- data/lib/eve_online/version.rb +1 -1
- metadata +30 -15
- data/.rubocop-thread_safety.yml +0 -9
- data/.rubocop.yml +0 -14
- data/.rubocop_general.yml +0 -102
- data/.rubocop_rspec.yml +0 -65
- data/.rubocop_todo.yml +0 -0
- data/.travis.yml +0 -100
- data/gemfiles/activesupport_42.gemfile +0 -7
- data/gemfiles/activesupport_50.gemfile +0 -7
- data/gemfiles/activesupport_51.gemfile +0 -7
- data/gemfiles/activesupport_52.gemfile +0 -7
- data/gemfiles/activesupport_60.gemfile +0 -7
- data/gemfiles/activesupport_edge.gemfile +0 -7
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "forwardable"
|
4
4
|
|
5
5
|
module EveOnline
|
6
6
|
module ESI
|
7
7
|
class Alliance < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
API_PATH =
|
10
|
+
API_PATH = "/v3/alliances/%<alliance_id>s/"
|
11
11
|
|
12
12
|
attr_reader :alliance_id
|
13
13
|
|
@@ -18,17 +18,17 @@ module EveOnline
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def_delegators :model, :as_json, :creator_corporation_id, :creator_id,
|
21
|
-
|
22
|
-
:name, :ticker
|
21
|
+
:date_founded, :executor_corporation_id, :faction_id, :name, :ticker
|
23
22
|
|
24
23
|
def model
|
25
24
|
@model ||= Models::Alliance.new(response)
|
26
25
|
end
|
27
26
|
|
28
|
-
def scope
|
27
|
+
def scope
|
28
|
+
end
|
29
29
|
|
30
30
|
def path
|
31
|
-
format(
|
31
|
+
format(API_PATH, alliance_id: alliance_id)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class AllianceCorporations < Base
|
6
|
-
API_PATH =
|
6
|
+
API_PATH = "/v1/alliances/%<alliance_id>s/corporations/"
|
7
7
|
|
8
8
|
attr_reader :alliance_id
|
9
9
|
|
@@ -17,10 +17,11 @@ module EveOnline
|
|
17
17
|
response
|
18
18
|
end
|
19
19
|
|
20
|
-
def scope
|
20
|
+
def scope
|
21
|
+
end
|
21
22
|
|
22
23
|
def path
|
23
|
-
format(
|
24
|
+
format(API_PATH, alliance_id: alliance_id)
|
24
25
|
end
|
25
26
|
end
|
26
27
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "forwardable"
|
4
4
|
|
5
5
|
module EveOnline
|
6
6
|
module ESI
|
7
7
|
class AllianceIcon < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
API_PATH =
|
10
|
+
API_PATH = "/v1/alliances/%<alliance_id>s/icons/"
|
11
11
|
|
12
12
|
attr_reader :alliance_id
|
13
13
|
|
@@ -23,10 +23,11 @@ module EveOnline
|
|
23
23
|
@model ||= Models::AllianceIcon.new(response)
|
24
24
|
end
|
25
25
|
|
26
|
-
def scope
|
26
|
+
def scope
|
27
|
+
end
|
27
28
|
|
28
29
|
def path
|
29
|
-
format(
|
30
|
+
format(API_PATH, alliance_id: alliance_id)
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|
data/lib/eve_online/esi/base.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
3
|
+
require "net/http"
|
4
|
+
require "openssl"
|
5
|
+
require "json"
|
6
|
+
require "active_support/time"
|
7
7
|
|
8
8
|
module EveOnline
|
9
9
|
module ESI
|
10
10
|
class Base
|
11
|
-
API_HOST =
|
11
|
+
API_HOST = "esi.evetech.net"
|
12
12
|
|
13
13
|
attr_reader :token, :parser, :_read_timeout, :_open_timeout, :_etag,
|
14
|
-
|
14
|
+
:datasource, :language
|
15
15
|
|
16
|
-
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new(
|
16
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.6.0")
|
17
17
|
attr_reader :_write_timeout
|
18
18
|
end
|
19
19
|
|
@@ -22,12 +22,12 @@ module EveOnline
|
|
22
22
|
@parser = options.fetch(:parser, JSON)
|
23
23
|
@_read_timeout = options.fetch(:read_timeout, 60)
|
24
24
|
@_open_timeout = options.fetch(:open_timeout, 60)
|
25
|
-
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new(
|
25
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.6.0")
|
26
26
|
@_write_timeout = options.fetch(:write_timeout, 60)
|
27
27
|
end
|
28
28
|
@_etag = options.fetch(:etag, nil)
|
29
|
-
@datasource = options.fetch(:datasource,
|
30
|
-
@language = options.fetch(:language,
|
29
|
+
@datasource = options.fetch(:datasource, "tranquility")
|
30
|
+
@language = options.fetch(:language, "en-us")
|
31
31
|
end
|
32
32
|
|
33
33
|
def url
|
@@ -39,11 +39,11 @@ module EveOnline
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def user_agent
|
42
|
-
"EveOnline API (https://github.com/evemonk/eve_online) v#{
|
42
|
+
"EveOnline API (https://github.com/evemonk/eve_online) v#{VERSION}"
|
43
43
|
end
|
44
44
|
|
45
45
|
def http_method
|
46
|
-
|
46
|
+
"Get"
|
47
47
|
end
|
48
48
|
|
49
49
|
def read_timeout
|
@@ -62,7 +62,7 @@ module EveOnline
|
|
62
62
|
client.open_timeout = value
|
63
63
|
end
|
64
64
|
|
65
|
-
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new(
|
65
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.6.0")
|
66
66
|
def write_timeout
|
67
67
|
client.write_timeout
|
68
68
|
end
|
@@ -77,13 +77,14 @@ module EveOnline
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def etag
|
80
|
-
resource.header[
|
80
|
+
resource.header["Etag"]&.gsub("W/", "")&.gsub('"', "")
|
81
81
|
end
|
82
82
|
|
83
|
-
def page
|
83
|
+
def page
|
84
|
+
end
|
84
85
|
|
85
86
|
def total_pages
|
86
|
-
resource.header[
|
87
|
+
resource.header["X-Pages"]&.to_i
|
87
88
|
end
|
88
89
|
|
89
90
|
def client
|
@@ -91,7 +92,7 @@ module EveOnline
|
|
91
92
|
http = Net::HTTP.new(uri.host, uri.port)
|
92
93
|
http.read_timeout = _read_timeout
|
93
94
|
http.open_timeout = _open_timeout
|
94
|
-
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new(
|
95
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.6.0")
|
95
96
|
http.write_timeout = _write_timeout
|
96
97
|
end
|
97
98
|
http.use_ssl = true
|
@@ -103,20 +104,20 @@ module EveOnline
|
|
103
104
|
|
104
105
|
def request
|
105
106
|
@request ||= begin
|
106
|
-
request = "Net::HTTP::#{
|
107
|
+
request = "Net::HTTP::#{http_method}".constantize.new(uri.request_uri)
|
107
108
|
|
108
|
-
request[
|
109
|
-
request[
|
110
|
-
request[
|
111
|
-
request[
|
112
|
-
request[
|
113
|
-
request.body = payload if http_method ==
|
109
|
+
request["User-Agent"] = user_agent
|
110
|
+
request["Accept"] = "application/json"
|
111
|
+
request["Authorization"] = "Bearer #{token}" if token
|
112
|
+
request["If-None-Match"] = _etag if _etag
|
113
|
+
request["Content-Type"] = "application/json" if http_method == "Post"
|
114
|
+
request.body = payload if http_method == "Post"
|
114
115
|
|
115
116
|
request
|
116
117
|
end
|
117
118
|
end
|
118
119
|
|
119
|
-
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new(
|
120
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0")
|
120
121
|
class Net::WriteTimeout < StandardError; end
|
121
122
|
end
|
122
123
|
|
@@ -126,7 +127,7 @@ module EveOnline
|
|
126
127
|
query: query.to_query)
|
127
128
|
end
|
128
129
|
|
129
|
-
def
|
130
|
+
def additional_query_params
|
130
131
|
[]
|
131
132
|
end
|
132
133
|
|
@@ -141,7 +142,7 @@ module EveOnline
|
|
141
142
|
def query
|
142
143
|
hash = {}
|
143
144
|
|
144
|
-
(base_query_params +
|
145
|
+
(base_query_params + additional_query_params).each do |param|
|
145
146
|
hash[param] = public_send(param)
|
146
147
|
end
|
147
148
|
|
@@ -197,7 +198,7 @@ module EveOnline
|
|
197
198
|
private
|
198
199
|
|
199
200
|
def parse_datetime_with_timezone(value)
|
200
|
-
ActiveSupport::TimeZone[
|
201
|
+
ActiveSupport::TimeZone["UTC"].parse(value)
|
201
202
|
end
|
202
203
|
end
|
203
204
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "forwardable"
|
4
4
|
|
5
5
|
module EveOnline
|
6
6
|
module ESI
|
7
7
|
class Character < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
API_PATH =
|
10
|
+
API_PATH = "/v4/characters/%<character_id>s/"
|
11
11
|
|
12
12
|
attr_reader :character_id
|
13
13
|
|
@@ -18,17 +18,18 @@ module EveOnline
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def_delegators :model, :as_json, :alliance_id, :ancestry_id, :birthday,
|
21
|
-
|
22
|
-
|
21
|
+
:bloodline_id, :corporation_id, :description, :faction_id, :gender,
|
22
|
+
:name, :race_id, :security_status, :title
|
23
23
|
|
24
24
|
def model
|
25
25
|
@model ||= Models::Character.new(response)
|
26
26
|
end
|
27
27
|
|
28
|
-
def scope
|
28
|
+
def scope
|
29
|
+
end
|
29
30
|
|
30
31
|
def path
|
31
|
-
format(
|
32
|
+
format(API_PATH, character_id: character_id)
|
32
33
|
end
|
33
34
|
end
|
34
35
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterAssets < Base
|
6
|
-
API_PATH =
|
6
|
+
API_PATH = "/v3/characters/%<character_id>s/assets/"
|
7
7
|
|
8
8
|
attr_reader :character_id, :page
|
9
9
|
|
@@ -26,15 +26,15 @@ module EveOnline
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def scope
|
29
|
-
|
29
|
+
"esi-assets.read_assets.v1"
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
32
|
+
def additional_query_params
|
33
33
|
[:page]
|
34
34
|
end
|
35
35
|
|
36
36
|
def path
|
37
|
-
format(
|
37
|
+
format(API_PATH, character_id: character_id)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterAssetsLocations < Base
|
6
|
-
API_PATH =
|
6
|
+
API_PATH = "/v2/characters/%<character_id>s/assets/locations/"
|
7
7
|
|
8
8
|
attr_reader :character_id, :item_ids
|
9
9
|
|
@@ -26,7 +26,7 @@ module EveOnline
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def http_method
|
29
|
-
|
29
|
+
"Post"
|
30
30
|
end
|
31
31
|
|
32
32
|
def payload
|
@@ -34,7 +34,7 @@ module EveOnline
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def scope
|
37
|
-
|
37
|
+
"esi-assets.read_assets.v1"
|
38
38
|
end
|
39
39
|
|
40
40
|
def etag
|
@@ -42,7 +42,7 @@ module EveOnline
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def path
|
45
|
-
format(
|
45
|
+
format(API_PATH, character_id: character_id)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterAssetsNames < Base
|
6
|
-
API_PATH =
|
6
|
+
API_PATH = "/v1/characters/%<character_id>s/assets/names/"
|
7
7
|
|
8
8
|
attr_reader :character_id, :item_ids
|
9
9
|
|
@@ -26,7 +26,7 @@ module EveOnline
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def http_method
|
29
|
-
|
29
|
+
"Post"
|
30
30
|
end
|
31
31
|
|
32
32
|
def payload
|
@@ -34,7 +34,7 @@ module EveOnline
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def scope
|
37
|
-
|
37
|
+
"esi-assets.read_assets.v1"
|
38
38
|
end
|
39
39
|
|
40
40
|
def etag
|
@@ -42,7 +42,7 @@ module EveOnline
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def path
|
45
|
-
format(
|
45
|
+
format(API_PATH, character_id: character_id)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "forwardable"
|
4
4
|
|
5
5
|
module EveOnline
|
6
6
|
module ESI
|
7
7
|
class CharacterAttributes < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
API_PATH =
|
10
|
+
API_PATH = "/v1/characters/%<character_id>s/attributes/"
|
11
11
|
|
12
12
|
attr_reader :character_id
|
13
13
|
|
@@ -18,19 +18,19 @@ module EveOnline
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def_delegators :model, :as_json, :accrued_remap_cooldown_date,
|
21
|
-
|
22
|
-
|
21
|
+
:bonus_remaps, :charisma, :intelligence, :last_remap_date, :memory,
|
22
|
+
:perception, :willpower
|
23
23
|
|
24
24
|
def model
|
25
25
|
@model ||= Models::Attributes.new(response)
|
26
26
|
end
|
27
27
|
|
28
28
|
def scope
|
29
|
-
|
29
|
+
"esi-skills.read_skills.v1"
|
30
30
|
end
|
31
31
|
|
32
32
|
def path
|
33
|
-
format(
|
33
|
+
format(API_PATH, character_id: character_id)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterBlueprints < Base
|
6
|
-
API_PATH =
|
6
|
+
API_PATH = "/v2/characters/%<character_id>s/blueprints/"
|
7
7
|
|
8
8
|
attr_reader :character_id, :page
|
9
9
|
|
@@ -26,15 +26,15 @@ module EveOnline
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def scope
|
29
|
-
|
29
|
+
"esi-characters.read_blueprints.v1"
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
32
|
+
def additional_query_params
|
33
33
|
[:page]
|
34
34
|
end
|
35
35
|
|
36
36
|
def path
|
37
|
-
format(
|
37
|
+
format(API_PATH, character_id: character_id)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|