eve_online 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +12 -7
- data/CHANGELOG.md +26 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +30 -27
- data/Gemfile.mutant.lock +20 -25
- data/README.md +41 -21
- data/TODO.md +1 -0
- data/eve_online.gemspec +8 -2
- data/lib/eve_online.rb +9 -4
- data/lib/eve_online/esi/alliance.rb +4 -2
- data/lib/eve_online/esi/alliances.rb +4 -0
- data/lib/eve_online/esi/base.rb +7 -11
- data/lib/eve_online/esi/character.rb +1 -2
- data/lib/eve_online/esi/character_assets.rb +8 -6
- data/lib/eve_online/esi/character_assets_locations.rb +8 -6
- data/lib/eve_online/esi/character_assets_names.rb +8 -6
- data/lib/eve_online/esi/character_attributes.rb +1 -2
- data/lib/eve_online/esi/character_blueprints.rb +8 -6
- data/lib/eve_online/esi/character_bookmark_folders.rb +8 -6
- data/lib/eve_online/esi/character_bookmarks.rb +8 -6
- data/lib/eve_online/esi/character_calendar.rb +8 -6
- data/lib/eve_online/esi/character_clones.rb +9 -8
- data/lib/eve_online/esi/character_fatigue.rb +1 -2
- data/lib/eve_online/esi/character_industry_jobs.rb +8 -6
- data/lib/eve_online/esi/character_killmails_recent.rb +8 -6
- data/lib/eve_online/esi/character_location.rb +1 -2
- data/lib/eve_online/esi/character_loyalty_points.rb +8 -6
- data/lib/eve_online/esi/character_notifications.rb +9 -6
- data/lib/eve_online/esi/character_online.rb +1 -2
- data/lib/eve_online/esi/character_orders.rb +8 -6
- data/lib/eve_online/esi/character_portrait.rb +1 -2
- data/lib/eve_online/esi/character_ship.rb +1 -2
- data/lib/eve_online/esi/character_skill_queue.rb +8 -6
- data/lib/eve_online/esi/character_skills.rb +8 -6
- data/lib/eve_online/esi/character_standings.rb +8 -6
- data/lib/eve_online/esi/character_wallet_journal.rb +8 -6
- data/lib/eve_online/esi/corporation.rb +5 -3
- data/lib/eve_online/esi/corporation_blueprints.rb +8 -6
- data/lib/eve_online/esi/corporation_industry_jobs.rb +8 -6
- data/lib/eve_online/esi/corporation_killmails_recent.rb +8 -6
- data/lib/eve_online/esi/corporation_orders.rb +8 -6
- data/lib/eve_online/esi/dogma_attribute.rb +1 -2
- data/lib/eve_online/esi/dogma_effect.rb +1 -2
- data/lib/eve_online/esi/market_history.rb +8 -6
- data/lib/eve_online/esi/models/alliance.rb +4 -1
- data/lib/eve_online/esi/models/corporation.rb +4 -1
- data/lib/eve_online/esi/models/model_with_etag.rb +13 -0
- data/lib/eve_online/esi/models/star.rb +4 -1
- data/lib/eve_online/esi/models/stargate.rb +4 -1
- data/lib/eve_online/esi/response_with_etag.rb +11 -0
- data/lib/eve_online/esi/server_status.rb +1 -2
- data/lib/eve_online/esi/{ancestries.rb → universe_ancestries.rb} +13 -7
- data/lib/eve_online/esi/{bloodlines.rb → universe_bloodlines.rb} +13 -7
- data/lib/eve_online/esi/universe_constellation.rb +1 -2
- data/lib/eve_online/esi/{factions.rb → universe_factions.rb} +13 -7
- data/lib/eve_online/esi/{races.rb → universe_races.rb} +13 -7
- data/lib/eve_online/esi/universe_region.rb +1 -2
- data/lib/eve_online/esi/universe_star.rb +5 -3
- data/lib/eve_online/esi/universe_stargate.rb +4 -3
- data/lib/eve_online/esi/universe_station.rb +1 -2
- data/lib/eve_online/esi/universe_system_jumps.rb +8 -6
- data/lib/eve_online/esi/universe_system_kills.rb +8 -6
- data/lib/eve_online/esi/universe_type.rb +1 -2
- data/lib/eve_online/esi/war_killmails.rb +8 -6
- data/lib/eve_online/version.rb +1 -1
- metadata +15 -38
- data/server.http +0 -0
@@ -14,13 +14,15 @@ module EveOnline
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def loyalty_points
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
@loyalty_points ||=
|
18
|
+
begin
|
19
|
+
output = []
|
20
|
+
response.each do |lp|
|
21
|
+
output << Models::LoyaltyPoint.new(lp)
|
22
|
+
end
|
23
|
+
output
|
24
|
+
end
|
22
25
|
end
|
23
|
-
memoize :loyalty_points
|
24
26
|
|
25
27
|
def scope
|
26
28
|
'esi-characters.read_loyalty.v1'
|
@@ -3,6 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterNotifications < Base
|
6
|
+
# TODO: migrate to v3 or v4
|
6
7
|
API_ENDPOINT = 'https://esi.evetech.net/v2/characters/%<character_id>s/notifications/?datasource=%<datasource>s'
|
7
8
|
|
8
9
|
attr_reader :character_id
|
@@ -14,13 +15,15 @@ module EveOnline
|
|
14
15
|
end
|
15
16
|
|
16
17
|
def notifications
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
@notifications ||=
|
19
|
+
begin
|
20
|
+
output = []
|
21
|
+
response.each do |notification|
|
22
|
+
output << Models::Notification.new(notification)
|
23
|
+
end
|
24
|
+
output
|
25
|
+
end
|
22
26
|
end
|
23
|
-
memoize :notifications
|
24
27
|
|
25
28
|
def scope
|
26
29
|
'esi-characters.read_notifications.v1'
|
@@ -14,13 +14,15 @@ module EveOnline
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def orders
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
@orders ||=
|
18
|
+
begin
|
19
|
+
output = []
|
20
|
+
response.each do |order|
|
21
|
+
output << Models::CharacterOrder.new(order)
|
22
|
+
end
|
23
|
+
output
|
24
|
+
end
|
22
25
|
end
|
23
|
-
memoize :orders
|
24
26
|
|
25
27
|
def scope
|
26
28
|
'esi-markets.read_character_orders.v1'
|
@@ -20,9 +20,8 @@ module EveOnline
|
|
20
20
|
def_delegators :model, :as_json, :ship_item_id, :ship_name, :ship_type_id
|
21
21
|
|
22
22
|
def model
|
23
|
-
Models::CharacterShip.new(response)
|
23
|
+
@model ||= Models::CharacterShip.new(response)
|
24
24
|
end
|
25
|
-
memoize :model
|
26
25
|
|
27
26
|
def scope
|
28
27
|
'esi-location.read_ship_type.v1'
|
@@ -14,13 +14,15 @@ module EveOnline
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def skills
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
@skills ||=
|
18
|
+
begin
|
19
|
+
output = []
|
20
|
+
response.each do |skill|
|
21
|
+
output << Models::SkillQueueEntry.new(skill)
|
22
|
+
end
|
23
|
+
output
|
24
|
+
end
|
22
25
|
end
|
23
|
-
memoize :skills
|
24
26
|
|
25
27
|
def scope
|
26
28
|
'esi-skills.read_skillqueue.v1'
|
@@ -21,13 +21,15 @@ module EveOnline
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def skills
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
@skills ||=
|
25
|
+
begin
|
26
|
+
output = []
|
27
|
+
response.fetch('skills').each do |skill|
|
28
|
+
output << Models::Skill.new(skill)
|
29
|
+
end
|
30
|
+
output
|
31
|
+
end
|
29
32
|
end
|
30
|
-
memoize :skills
|
31
33
|
|
32
34
|
def total_sp
|
33
35
|
response['total_sp']
|
@@ -14,13 +14,15 @@ module EveOnline
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def standings
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
@standings ||=
|
18
|
+
begin
|
19
|
+
output = []
|
20
|
+
response.each do |standing|
|
21
|
+
output << Models::Standing.new(standing)
|
22
|
+
end
|
23
|
+
output
|
24
|
+
end
|
22
25
|
end
|
23
|
-
memoize :standings
|
24
26
|
|
25
27
|
def scope
|
26
28
|
'esi-characters.read_standings.v1'
|
@@ -15,13 +15,15 @@ module EveOnline
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def wallet_journal_entries
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
@wallet_journal_entries ||=
|
19
|
+
begin
|
20
|
+
output = []
|
21
|
+
response.each do |wallet_journal_entry|
|
22
|
+
output << Models::WalletJournalEntry.new(wallet_journal_entry)
|
23
|
+
end
|
24
|
+
output
|
25
|
+
end
|
23
26
|
end
|
24
|
-
memoize :wallet_journal_entries
|
25
27
|
|
26
28
|
def scope
|
27
29
|
'esi-wallet.read_character_wallet.v1'
|
@@ -7,6 +7,8 @@ module EveOnline
|
|
7
7
|
class Corporation < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
+
include ResponseWithEtag
|
11
|
+
|
10
12
|
API_ENDPOINT = 'https://esi.evetech.net/v4/corporations/%<corporation_id>s/?datasource=%<datasource>s'
|
11
13
|
|
12
14
|
attr_reader :corporation_id
|
@@ -17,15 +19,15 @@ module EveOnline
|
|
17
19
|
@corporation_id = options.fetch(:corporation_id)
|
18
20
|
end
|
19
21
|
|
22
|
+
# TODO: war_eligible
|
20
23
|
def_delegators :model, :as_json, :alliance_id, :ceo_id, :creator_id,
|
21
24
|
:date_founded, :description, :faction_id,
|
22
25
|
:home_station_id, :member_count, :name, :shares,
|
23
|
-
:tax_rate, :ticker, :corporation_url
|
26
|
+
:tax_rate, :ticker, :corporation_url, :etag
|
24
27
|
|
25
28
|
def model
|
26
|
-
Models::Corporation.new(
|
29
|
+
@model ||= Models::Corporation.new(response_with_etag)
|
27
30
|
end
|
28
|
-
memoize :model
|
29
31
|
|
30
32
|
def scope; end
|
31
33
|
|
@@ -15,13 +15,15 @@ module EveOnline
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def blueprints
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
@blueprints ||=
|
19
|
+
begin
|
20
|
+
output = []
|
21
|
+
response.each do |blueprint|
|
22
|
+
output << Models::Blueprint.new(blueprint)
|
23
|
+
end
|
24
|
+
output
|
25
|
+
end
|
23
26
|
end
|
24
|
-
memoize :blueprints
|
25
27
|
|
26
28
|
def scope
|
27
29
|
'esi-corporations.read_blueprints.v1'
|
@@ -16,13 +16,15 @@ module EveOnline
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def jobs
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
@jobs ||=
|
20
|
+
begin
|
21
|
+
output = []
|
22
|
+
response.each do |job|
|
23
|
+
output << Models::CorporationIndustryJob.new(job)
|
24
|
+
end
|
25
|
+
output
|
26
|
+
end
|
24
27
|
end
|
25
|
-
memoize :jobs
|
26
28
|
|
27
29
|
def scope
|
28
30
|
'esi-industry.read_corporation_jobs.v1'
|
@@ -15,13 +15,15 @@ module EveOnline
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def killmails
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
@killmails ||=
|
19
|
+
begin
|
20
|
+
output = []
|
21
|
+
response.each do |killmail|
|
22
|
+
output << Models::KillmailShort.new(killmail)
|
23
|
+
end
|
24
|
+
output
|
25
|
+
end
|
23
26
|
end
|
24
|
-
memoize :killmails
|
25
27
|
|
26
28
|
def scope
|
27
29
|
'esi-killmails.read_corporation_killmails.v1'
|
@@ -15,13 +15,15 @@ module EveOnline
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def orders
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
@orders ||=
|
19
|
+
begin
|
20
|
+
output = []
|
21
|
+
response.each do |order|
|
22
|
+
output << Models::CorporationOrder.new(order)
|
23
|
+
end
|
24
|
+
output
|
25
|
+
end
|
23
26
|
end
|
24
|
-
memoize :orders
|
25
27
|
|
26
28
|
def scope
|
27
29
|
'esi-markets.read_corporation_orders.v1'
|
@@ -15,13 +15,15 @@ module EveOnline
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def history
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
@history ||=
|
19
|
+
begin
|
20
|
+
output = []
|
21
|
+
response.each do |history|
|
22
|
+
output << Models::MarketHistory.new(history)
|
23
|
+
end
|
24
|
+
output
|
25
|
+
end
|
23
26
|
end
|
24
|
-
memoize :history
|
25
27
|
|
26
28
|
def scope; end
|
27
29
|
|
@@ -4,6 +4,8 @@ module EveOnline
|
|
4
4
|
module ESI
|
5
5
|
module Models
|
6
6
|
class Alliance < Base
|
7
|
+
include ModelWithEtag
|
8
|
+
|
7
9
|
def as_json
|
8
10
|
{
|
9
11
|
creator_corporation_id: creator_corporation_id,
|
@@ -12,7 +14,8 @@ module EveOnline
|
|
12
14
|
executor_corporation_id: executor_corporation_id,
|
13
15
|
faction_id: faction_id,
|
14
16
|
name: name,
|
15
|
-
ticker: ticker
|
17
|
+
ticker: ticker,
|
18
|
+
etag: etag
|
16
19
|
}
|
17
20
|
end
|
18
21
|
|
@@ -4,6 +4,8 @@ module EveOnline
|
|
4
4
|
module ESI
|
5
5
|
module Models
|
6
6
|
class Corporation < Base
|
7
|
+
include ModelWithEtag
|
8
|
+
|
7
9
|
def as_json
|
8
10
|
{
|
9
11
|
alliance_id: alliance_id,
|
@@ -18,7 +20,8 @@ module EveOnline
|
|
18
20
|
shares: shares,
|
19
21
|
tax_rate: tax_rate,
|
20
22
|
ticker: ticker,
|
21
|
-
corporation_url: corporation_url
|
23
|
+
corporation_url: corporation_url,
|
24
|
+
etag: etag
|
22
25
|
}
|
23
26
|
end
|
24
27
|
|
@@ -4,6 +4,8 @@ module EveOnline
|
|
4
4
|
module ESI
|
5
5
|
module Models
|
6
6
|
class Star < Base
|
7
|
+
include ModelWithEtag
|
8
|
+
|
7
9
|
def as_json
|
8
10
|
{
|
9
11
|
age: age,
|
@@ -13,7 +15,8 @@ module EveOnline
|
|
13
15
|
solar_system_id: solar_system_id,
|
14
16
|
spectral_class: spectral_class,
|
15
17
|
temperature: temperature,
|
16
|
-
type_id: type_id
|
18
|
+
type_id: type_id,
|
19
|
+
etag: etag
|
17
20
|
}
|
18
21
|
end
|
19
22
|
|