eve_online 0.17.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -12
- data/CHANGELOG.md +20 -0
- data/Gemfile.lock +3 -3
- data/README.md +240 -32
- data/TODO.md +4 -1
- data/lib/eve_online.rb +17 -0
- data/lib/eve_online/esi/alliance.rb +1 -1
- data/lib/eve_online/esi/alliance_corporations.rb +1 -1
- data/lib/eve_online/esi/alliance_icon.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 +6 -0
- data/lib/eve_online/esi/bloodlines.rb +1 -1
- data/lib/eve_online/esi/character.rb +1 -1
- data/lib/eve_online/esi/character_assets.rb +8 -3
- data/lib/eve_online/esi/character_attributes.rb +1 -1
- data/lib/eve_online/esi/character_blueprints.rb +8 -3
- data/lib/eve_online/esi/character_bookmark_folders.rb +8 -3
- data/lib/eve_online/esi/character_bookmarks.rb +8 -3
- data/lib/eve_online/esi/character_calendar.rb +1 -1
- data/lib/eve_online/esi/character_clones.rb +1 -1
- data/lib/eve_online/esi/character_fatigue.rb +1 -1
- data/lib/eve_online/esi/character_implants.rb +1 -1
- data/lib/eve_online/esi/character_industry_jobs.rb +1 -1
- data/lib/eve_online/esi/character_killmails_recent.rb +39 -0
- data/lib/eve_online/esi/character_location.rb +37 -0
- data/lib/eve_online/esi/character_loyalty_points.rb +1 -1
- data/lib/eve_online/esi/character_notifications.rb +1 -1
- data/lib/eve_online/esi/character_online.rb +1 -1
- data/lib/eve_online/esi/character_orders.rb +1 -1
- data/lib/eve_online/esi/character_portrait.rb +1 -1
- data/lib/eve_online/esi/character_ship.rb +36 -0
- data/lib/eve_online/esi/character_skill_queue.rb +1 -1
- data/lib/eve_online/esi/character_skills.rb +1 -1
- data/lib/eve_online/esi/character_standings.rb +1 -1
- data/lib/eve_online/esi/character_wallet.rb +1 -1
- data/lib/eve_online/esi/character_wallet_journal.rb +8 -3
- data/lib/eve_online/esi/corporation.rb +1 -1
- data/lib/eve_online/esi/corporation_blueprints.rb +8 -3
- data/lib/eve_online/esi/corporation_industry_jobs.rb +8 -3
- data/lib/eve_online/esi/corporation_killmails_recent.rb +39 -0
- data/lib/eve_online/esi/corporation_orders.rb +8 -3
- data/lib/eve_online/esi/dogma_attribute.rb +1 -1
- data/lib/eve_online/esi/dogma_attributes.rb +1 -1
- data/lib/eve_online/esi/factions.rb +1 -1
- data/lib/eve_online/esi/market_history.rb +1 -1
- data/lib/eve_online/esi/models/alliance_icon.rb +1 -1
- data/lib/eve_online/esi/models/character_location.rb +29 -0
- data/lib/eve_online/esi/models/character_ship.rb +29 -0
- data/lib/eve_online/esi/models/constellation.rb +49 -0
- data/lib/eve_online/esi/models/killmail_short.rb +24 -0
- data/lib/eve_online/esi/models/region.rb +34 -0
- data/lib/eve_online/esi/races.rb +1 -1
- data/lib/eve_online/esi/server_status.rb +1 -1
- data/lib/eve_online/esi/universe_constellation.rb +35 -0
- data/lib/eve_online/esi/universe_constellations.rb +19 -0
- data/lib/eve_online/esi/universe_region.rb +35 -0
- data/lib/eve_online/esi/universe_regions.rb +19 -0
- data/lib/eve_online/esi/universe_systems.rb +19 -0
- data/lib/eve_online/esi/universe_type.rb +1 -1
- data/lib/eve_online/esi/universe_types.rb +14 -2
- data/lib/eve_online/esi/war_killmails.rb +37 -0
- data/lib/eve_online/esi/wars.rb +19 -0
- data/lib/eve_online/version.rb +1 -1
- metadata +18 -2
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterNotifications < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v2/characters/%<character_id>s/notifications/?datasource=%<datasource>s'
|
7
7
|
|
8
8
|
attr_reader :character_id
|
9
9
|
|
@@ -7,7 +7,7 @@ module EveOnline
|
|
7
7
|
class CharacterOnline < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
API_ENDPOINT = 'https://esi.
|
10
|
+
API_ENDPOINT = 'https://esi.evetech.net/v2/characters/%<character_id>s/online/?datasource=%<datasource>s'
|
11
11
|
|
12
12
|
attr_reader :character_id
|
13
13
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterOrders < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v2/characters/%<character_id>s/orders/?datasource=%<datasource>s'
|
7
7
|
|
8
8
|
attr_reader :character_id
|
9
9
|
|
@@ -7,7 +7,7 @@ module EveOnline
|
|
7
7
|
class CharacterPortrait < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
API_ENDPOINT = 'https://esi.
|
10
|
+
API_ENDPOINT = 'https://esi.evetech.net/v2/characters/%<character_id>s/portrait/?datasource=%<datasource>s'
|
11
11
|
|
12
12
|
attr_reader :character_id
|
13
13
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'forwardable'
|
4
|
+
|
5
|
+
module EveOnline
|
6
|
+
module ESI
|
7
|
+
class CharacterShip < Base
|
8
|
+
extend Forwardable
|
9
|
+
|
10
|
+
API_ENDPOINT = 'https://esi.evetech.net/v1/characters/%<character_id>s/ship/?datasource=%<datasource>s'
|
11
|
+
|
12
|
+
attr_reader :character_id
|
13
|
+
|
14
|
+
def initialize(options)
|
15
|
+
super
|
16
|
+
|
17
|
+
@character_id = options.fetch(:character_id)
|
18
|
+
end
|
19
|
+
|
20
|
+
def_delegators :model, :as_json, :ship_item_id, :ship_name, :ship_type_id
|
21
|
+
|
22
|
+
def model
|
23
|
+
Models::CharacterShip.new(response)
|
24
|
+
end
|
25
|
+
memoize :model
|
26
|
+
|
27
|
+
def scope
|
28
|
+
'esi-location.read_ship_type.v1'
|
29
|
+
end
|
30
|
+
|
31
|
+
def url
|
32
|
+
format(API_ENDPOINT, character_id: character_id, datasource: datasource)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterSkillQueue < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v2/characters/%<character_id>s/skillqueue/?datasource=%<datasource>s'
|
7
7
|
|
8
8
|
attr_reader :character_id
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterSkills < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v4/characters/%<character_id>s/skills/?datasource=%<datasource>s'
|
7
7
|
|
8
8
|
attr_reader :character_id
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterStandings < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v1/characters/%<character_id>s/standings/?datasource=%<datasource>s'
|
7
7
|
|
8
8
|
attr_reader :character_id
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterWallet < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v1/characters/%<character_id>s/wallet/?datasource=%<datasource>s'
|
7
7
|
|
8
8
|
attr_reader :character_id
|
9
9
|
|
@@ -3,14 +3,15 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CharacterWalletJournal < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v4/characters/%<character_id>s/wallet/journal/?datasource=%<datasource>s&page=%<page>s'
|
7
7
|
|
8
|
-
attr_reader :character_id
|
8
|
+
attr_reader :character_id, :page
|
9
9
|
|
10
10
|
def initialize(options)
|
11
11
|
super
|
12
12
|
|
13
13
|
@character_id = options.fetch(:character_id)
|
14
|
+
@page = options.fetch(:page, 1)
|
14
15
|
end
|
15
16
|
|
16
17
|
def wallet_journal_entries
|
@@ -22,12 +23,16 @@ module EveOnline
|
|
22
23
|
end
|
23
24
|
memoize :wallet_journal_entries
|
24
25
|
|
26
|
+
def total_pages
|
27
|
+
resource.headers['x-pages']&.to_i
|
28
|
+
end
|
29
|
+
|
25
30
|
def scope
|
26
31
|
'esi-wallet.read_character_wallet.v1'
|
27
32
|
end
|
28
33
|
|
29
34
|
def url
|
30
|
-
format(API_ENDPOINT, character_id: character_id, datasource: datasource)
|
35
|
+
format(API_ENDPOINT, character_id: character_id, datasource: datasource, page: page)
|
31
36
|
end
|
32
37
|
end
|
33
38
|
end
|
@@ -7,7 +7,7 @@ module EveOnline
|
|
7
7
|
class Corporation < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
API_ENDPOINT = 'https://esi.
|
10
|
+
API_ENDPOINT = 'https://esi.evetech.net/v4/corporations/%<corporation_id>s/?datasource=%<datasource>s'
|
11
11
|
|
12
12
|
attr_reader :corporation_id
|
13
13
|
|
@@ -3,14 +3,15 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CorporationBlueprints < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v2/corporations/%<corporation_id>s/blueprints/?datasource=%<datasource>s&page=%<page>s'
|
7
7
|
|
8
|
-
attr_reader :corporation_id
|
8
|
+
attr_reader :corporation_id, :page
|
9
9
|
|
10
10
|
def initialize(options)
|
11
11
|
super
|
12
12
|
|
13
13
|
@corporation_id = options.fetch(:corporation_id)
|
14
|
+
@page = options.fetch(:page, 1)
|
14
15
|
end
|
15
16
|
|
16
17
|
def blueprints
|
@@ -22,12 +23,16 @@ module EveOnline
|
|
22
23
|
end
|
23
24
|
memoize :blueprints
|
24
25
|
|
26
|
+
def total_pages
|
27
|
+
resource.headers['x-pages']&.to_i
|
28
|
+
end
|
29
|
+
|
25
30
|
def scope
|
26
31
|
'esi-corporations.read_blueprints.v1'
|
27
32
|
end
|
28
33
|
|
29
34
|
def url
|
30
|
-
format(API_ENDPOINT, corporation_id: corporation_id, datasource: datasource)
|
35
|
+
format(API_ENDPOINT, corporation_id: corporation_id, datasource: datasource, page: page)
|
31
36
|
end
|
32
37
|
end
|
33
38
|
end
|
@@ -3,15 +3,16 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CorporationIndustryJobs < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v1/corporations/%<corporation_id>s/industry/jobs/?datasource=%<datasource>s&include_completed=%<include_completed>s&page=%<page>s'
|
7
7
|
|
8
|
-
attr_reader :corporation_id, :include_completed
|
8
|
+
attr_reader :corporation_id, :include_completed, :page
|
9
9
|
|
10
10
|
def initialize(options)
|
11
11
|
super
|
12
12
|
|
13
13
|
@corporation_id = options.fetch(:corporation_id)
|
14
14
|
@include_completed = options.fetch(:include_completed, false)
|
15
|
+
@page = options.fetch(:page, 1)
|
15
16
|
end
|
16
17
|
|
17
18
|
def jobs
|
@@ -23,12 +24,16 @@ module EveOnline
|
|
23
24
|
end
|
24
25
|
memoize :jobs
|
25
26
|
|
27
|
+
def total_pages
|
28
|
+
resource.headers['x-pages']&.to_i
|
29
|
+
end
|
30
|
+
|
26
31
|
def scope
|
27
32
|
'esi-industry.read_corporation_jobs.v1'
|
28
33
|
end
|
29
34
|
|
30
35
|
def url
|
31
|
-
format(API_ENDPOINT, corporation_id: corporation_id, include_completed: include_completed, datasource: datasource)
|
36
|
+
format(API_ENDPOINT, corporation_id: corporation_id, include_completed: include_completed, datasource: datasource, page: page)
|
32
37
|
end
|
33
38
|
end
|
34
39
|
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
class CorporationKillmailsRecent < Base
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v1/corporations/%<corporation_id>s/killmails/recent/?datasource=%<datasource>s&page=%<page>s'
|
7
|
+
|
8
|
+
attr_reader :corporation_id, :page
|
9
|
+
|
10
|
+
def initialize(options = {})
|
11
|
+
super
|
12
|
+
|
13
|
+
@corporation_id = options.fetch(:corporation_id)
|
14
|
+
@page = options.fetch(:page, 1)
|
15
|
+
end
|
16
|
+
|
17
|
+
def killmails
|
18
|
+
output = []
|
19
|
+
response.each do |killmail|
|
20
|
+
output << Models::KillmailShort.new(killmail)
|
21
|
+
end
|
22
|
+
output
|
23
|
+
end
|
24
|
+
memoize :killmails
|
25
|
+
|
26
|
+
def total_pages
|
27
|
+
resource.headers['x-pages']&.to_i
|
28
|
+
end
|
29
|
+
|
30
|
+
def scope
|
31
|
+
'esi-killmails.read_corporation_killmails.v1'
|
32
|
+
end
|
33
|
+
|
34
|
+
def url
|
35
|
+
format(API_ENDPOINT, corporation_id: corporation_id, datasource: datasource, page: page)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -3,14 +3,15 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class CorporationOrders < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v3/corporations/%<corporation_id>s/orders/?datasource=%<datasource>s&page=%<page>s'
|
7
7
|
|
8
|
-
attr_reader :corporation_id
|
8
|
+
attr_reader :corporation_id, :page
|
9
9
|
|
10
10
|
def initialize(options)
|
11
11
|
super
|
12
12
|
|
13
13
|
@corporation_id = options.fetch(:corporation_id)
|
14
|
+
@page = options.fetch(:page, 1)
|
14
15
|
end
|
15
16
|
|
16
17
|
def orders
|
@@ -22,6 +23,10 @@ module EveOnline
|
|
22
23
|
end
|
23
24
|
memoize :orders
|
24
25
|
|
26
|
+
def total_pages
|
27
|
+
resource.headers['x-pages']&.to_i
|
28
|
+
end
|
29
|
+
|
25
30
|
def scope
|
26
31
|
'esi-markets.read_corporation_orders.v1'
|
27
32
|
end
|
@@ -32,7 +37,7 @@ module EveOnline
|
|
32
37
|
# end
|
33
38
|
|
34
39
|
def url
|
35
|
-
format(API_ENDPOINT, corporation_id: corporation_id, datasource: datasource)
|
40
|
+
format(API_ENDPOINT, corporation_id: corporation_id, datasource: datasource, page: page)
|
36
41
|
end
|
37
42
|
end
|
38
43
|
end
|
@@ -7,7 +7,7 @@ module EveOnline
|
|
7
7
|
class DogmaAttribute < Base
|
8
8
|
extend Forwardable
|
9
9
|
|
10
|
-
API_ENDPOINT = 'https://esi.
|
10
|
+
API_ENDPOINT = 'https://esi.evetech.net/v1/dogma/attributes/%<attribute_id>s/?datasource=%<datasource>s'
|
11
11
|
|
12
12
|
attr_reader :id
|
13
13
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class DogmaAttributes < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v1/dogma/attributes/?datasource=%<datasource>s'
|
7
7
|
|
8
8
|
def attributes
|
9
9
|
response
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class Factions < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v2/universe/factions/?datasource=%<datasource>s&language=en-us'
|
7
7
|
|
8
8
|
def factions
|
9
9
|
output = []
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module EveOnline
|
4
4
|
module ESI
|
5
5
|
class MarketHistory < Base
|
6
|
-
API_ENDPOINT = 'https://esi.
|
6
|
+
API_ENDPOINT = 'https://esi.evetech.net/v1/markets/%<region_id>s/history/?datasource=%<datasource>s&type_id=%<type_id>s'
|
7
7
|
|
8
8
|
attr_reader :region_id, :type_id
|
9
9
|
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class CharacterLocation < Base
|
7
|
+
def as_json
|
8
|
+
{
|
9
|
+
solar_system_id: solar_system_id,
|
10
|
+
station_id: station_id,
|
11
|
+
structure_id: structure_id
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
def solar_system_id
|
16
|
+
options['solar_system_id']
|
17
|
+
end
|
18
|
+
|
19
|
+
def station_id
|
20
|
+
options['station_id']
|
21
|
+
end
|
22
|
+
|
23
|
+
def structure_id
|
24
|
+
options['structure_id']
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class CharacterShip < Base
|
7
|
+
def as_json
|
8
|
+
{
|
9
|
+
ship_item_id: ship_item_id,
|
10
|
+
ship_name: ship_name,
|
11
|
+
ship_type_id: ship_type_id
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
def ship_item_id
|
16
|
+
options['ship_item_id']
|
17
|
+
end
|
18
|
+
|
19
|
+
def ship_name
|
20
|
+
options['ship_name']
|
21
|
+
end
|
22
|
+
|
23
|
+
def ship_type_id
|
24
|
+
options['ship_type_id']
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
module Models
|
6
|
+
class Constellation < Base
|
7
|
+
def as_json
|
8
|
+
{
|
9
|
+
constellation_id: constellation_id,
|
10
|
+
name: name,
|
11
|
+
position_x: position_x,
|
12
|
+
position_y: position_y,
|
13
|
+
position_z: position_z,
|
14
|
+
region_id: region_id,
|
15
|
+
systems: systems
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
def constellation_id
|
20
|
+
options['constellation_id']
|
21
|
+
end
|
22
|
+
|
23
|
+
def name
|
24
|
+
options['name']
|
25
|
+
end
|
26
|
+
|
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
|
+
def region_id
|
40
|
+
options['region_id']
|
41
|
+
end
|
42
|
+
|
43
|
+
def systems
|
44
|
+
options['systems']
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|