eve_online 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +0 -1
- data/.rubocop-thread_safety.yml +9 -0
- data/.rubocop.yml +26 -102
- data/.rubocop_general.yml +94 -0
- data/.rubocop_rspec.yml +61 -0
- data/.rubocop_todo.yml +0 -0
- data/.travis.yml +14 -29
- data/CHANGELOG.md +329 -0
- data/Gemfile +1 -2
- data/README.md +840 -1088
- data/eve_online.gemspec +8 -8
- data/lib/eve_online.rb +45 -59
- data/lib/eve_online/esi/alliance.rb +33 -0
- data/lib/eve_online/esi/alliance_icon.rb +32 -0
- data/lib/eve_online/esi/base.rb +3 -2
- data/lib/eve_online/esi/bloodlines.rb +22 -0
- data/lib/eve_online/esi/character.rb +13 -56
- data/lib/eve_online/esi/character_assets.rb +32 -0
- data/lib/eve_online/esi/character_attributes.rb +36 -0
- data/lib/eve_online/esi/character_blueprints.rb +32 -0
- data/lib/eve_online/esi/character_clones.rb +43 -0
- data/lib/eve_online/esi/character_fatigue.rb +35 -0
- data/lib/eve_online/esi/character_implants.rb +27 -0
- data/lib/eve_online/esi/character_industry_jobs.rb +33 -0
- data/lib/eve_online/esi/character_loyalty_points.rb +4 -3
- data/lib/eve_online/esi/character_portrait.rb +12 -40
- data/lib/eve_online/esi/character_skill_queue.rb +6 -5
- data/lib/eve_online/esi/character_skills.rb +6 -5
- data/lib/eve_online/esi/character_standings.rb +32 -0
- data/lib/eve_online/esi/character_wallet.rb +33 -0
- data/lib/eve_online/esi/corporation.rb +35 -0
- data/lib/eve_online/esi/corporation_industry_jobs.rb +33 -0
- data/lib/eve_online/esi/dogma_attribute.rb +34 -0
- data/lib/eve_online/esi/dogma_attributes.rb +17 -0
- data/lib/eve_online/esi/factions.rb +22 -0
- data/lib/eve_online/esi/models/alliance.rb +34 -0
- data/lib/eve_online/esi/models/alliance_icon.rb +22 -0
- data/lib/eve_online/esi/models/asset.rb +47 -0
- data/lib/eve_online/esi/models/attributes.rb +56 -0
- data/lib/eve_online/esi/models/base.rb +21 -0
- data/lib/eve_online/esi/models/bloodline.rb +67 -0
- data/lib/eve_online/esi/models/blueprint.rb +52 -0
- data/lib/eve_online/esi/models/character.rb +64 -0
- data/lib/eve_online/esi/models/character_portrait.rb +48 -0
- data/lib/eve_online/esi/models/corporation.rb +69 -0
- data/lib/eve_online/esi/models/dogma_attribute.rb +62 -0
- data/lib/eve_online/esi/models/faction.rb +62 -0
- data/lib/eve_online/esi/models/fatigue.rb +33 -0
- data/lib/eve_online/esi/models/home_location.rb +22 -0
- data/lib/eve_online/esi/models/industry_job.rb +130 -0
- data/lib/eve_online/esi/models/jump_clone.rb +27 -0
- data/lib/eve_online/esi/models/loyalty_point.rb +1 -7
- data/lib/eve_online/esi/models/race.rb +32 -0
- data/lib/eve_online/esi/models/server_status.rb +34 -0
- data/lib/eve_online/esi/models/skill.rb +1 -7
- data/lib/eve_online/esi/models/skill_queue_entry.rb +13 -17
- data/lib/eve_online/esi/models/standing.rb +27 -0
- data/lib/eve_online/esi/races.rb +22 -0
- data/lib/eve_online/esi/server_status.rb +8 -24
- data/lib/eve_online/version.rb +1 -1
- metadata +67 -83
- data/.codeclimate.yml +0 -11
- data/.editorconfig +0 -10
- data/.rspec +0 -1
- data/lib/eve_online/base_crest.rb +0 -11
- data/lib/eve_online/blueprint.rb +0 -60
- data/lib/eve_online/character.rb +0 -54
- data/lib/eve_online/character_implants.rb +0 -29
- data/lib/eve_online/character_jump_clone_implants.rb +0 -29
- data/lib/eve_online/character_jump_clones.rb +0 -29
- data/lib/eve_online/character_skills.rb +0 -29
- data/lib/eve_online/eve/character_id.rb +0 -41
- data/lib/eve_online/implant.rb +0 -24
- data/lib/eve_online/item.rb +0 -49
- data/lib/eve_online/jump_clone.rb +0 -34
- data/lib/eve_online/jump_clone_implant.rb +0 -29
- data/lib/eve_online/sde/chr_races.rb +0 -14
- data/lib/eve_online/sde/models/chr_race.rb +0 -38
- data/lib/eve_online/skill.rb +0 -34
- data/lib/eve_online/sovereignty/campaigns.rb +0 -28
- data/lib/eve_online/standing.rb +0 -29
- data/lib/eve_online/xml/account_characters.rb +0 -48
- data/lib/eve_online/xml/account_status.rb +0 -31
- data/lib/eve_online/xml/api_key_info.rb +0 -63
- data/lib/eve_online/xml/character_account_balance.rb +0 -59
- data/lib/eve_online/xml/character_asset_list.rb +0 -54
- data/lib/eve_online/xml/character_blueprints.rb +0 -53
- data/lib/eve_online/xml/character_calendar_event_attendees.rb +0 -24
- data/lib/eve_online/xml/character_chat_channels.rb +0 -25
- data/lib/eve_online/xml/character_contact_list.rb +0 -25
- data/lib/eve_online/xml/character_contract_bids.rb +0 -23
- data/lib/eve_online/xml/character_contract_items.rb +0 -24
- data/lib/eve_online/xml/character_contracts.rb +0 -26
- data/lib/eve_online/xml/character_fac_war_stats.rb +0 -23
- data/lib/eve_online/xml/character_industry_jobs.rb +0 -23
- data/lib/eve_online/xml/character_industry_jobs_history.rb +0 -23
- data/lib/eve_online/xml/character_kill_mails.rb +0 -25
- data/lib/eve_online/xml/character_locations.rb +0 -32
- data/lib/eve_online/xml/character_mail_bodies.rb +0 -30
- data/lib/eve_online/xml/character_mail_messages.rb +0 -23
- data/lib/eve_online/xml/character_mailing_lists.rb +0 -23
- data/lib/eve_online/xml/character_medals.rb +0 -23
- data/lib/eve_online/xml/character_notification_texts.rb +0 -32
- data/lib/eve_online/xml/character_notifications.rb +0 -23
- data/lib/eve_online/xml/character_planetary_colonies.rb +0 -23
- data/lib/eve_online/xml/character_planetary_links.rb +0 -24
- data/lib/eve_online/xml/character_planetary_pins.rb +0 -24
- data/lib/eve_online/xml/character_planetary_routes.rb +0 -24
- data/lib/eve_online/xml/character_research.rb +0 -23
- data/lib/eve_online/xml/character_sheet.rb +0 -231
- data/lib/eve_online/xml/character_skill_in_training.rb +0 -68
- data/lib/eve_online/xml/character_skill_queue.rb +0 -51
- data/lib/eve_online/xml/character_standings.rb +0 -67
- data/lib/eve_online/xml/character_wallet_transactions.rb +0 -24
- data/lib/eve_online/xml/models/account_status.rb +0 -40
- data/lib/eve_online/xml/models/account_type_object.rb +0 -22
- data/lib/eve_online/xml/models/api_key_info.rb +0 -35
- data/lib/eve_online/xml/models/skill_queue_entry.rb +0 -55
- data/lib/eve_online/xml/server_status.rb +0 -31
@@ -0,0 +1,32 @@
|
|
1
|
+
module EveOnline
|
2
|
+
module ESI
|
3
|
+
class CharacterBlueprints < Base
|
4
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v2/characters/%s/blueprints/?datasource=tranquility&page=1'.freeze
|
5
|
+
|
6
|
+
attr_reader :character_id
|
7
|
+
|
8
|
+
def initialize(options)
|
9
|
+
super
|
10
|
+
|
11
|
+
@character_id = options[:character_id]
|
12
|
+
end
|
13
|
+
|
14
|
+
def blueprints
|
15
|
+
output = []
|
16
|
+
response.each do |blueprint|
|
17
|
+
output << Models::Blueprint.new(blueprint)
|
18
|
+
end
|
19
|
+
output
|
20
|
+
end
|
21
|
+
memoize :blueprints
|
22
|
+
|
23
|
+
def scope
|
24
|
+
'esi-characters.read_blueprints.v1'
|
25
|
+
end
|
26
|
+
|
27
|
+
def url
|
28
|
+
API_ENDPOINT % character_id
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module EveOnline
|
2
|
+
module ESI
|
3
|
+
class CharacterClones < Base
|
4
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v2/characters/%s/clones/?datasource=tranquility'.freeze
|
5
|
+
|
6
|
+
attr_reader :character_id
|
7
|
+
|
8
|
+
def initialize(options)
|
9
|
+
super
|
10
|
+
|
11
|
+
@character_id = options[:character_id]
|
12
|
+
end
|
13
|
+
|
14
|
+
def last_jump_date
|
15
|
+
last_jump_date = response['last_jump_date']
|
16
|
+
|
17
|
+
parse_datetime_with_timezone(last_jump_date) if last_jump_date
|
18
|
+
end
|
19
|
+
|
20
|
+
def home_location
|
21
|
+
Models::HomeLocation.new(response['home_location'])
|
22
|
+
end
|
23
|
+
memoize :home_location
|
24
|
+
|
25
|
+
def jump_clones
|
26
|
+
output = []
|
27
|
+
response['jump_clones'].each do |jump_clone|
|
28
|
+
output << Models::JumpClone.new(jump_clone)
|
29
|
+
end
|
30
|
+
output
|
31
|
+
end
|
32
|
+
memoize :jump_clones
|
33
|
+
|
34
|
+
def scope
|
35
|
+
'esi-clones.read_clones.v1'
|
36
|
+
end
|
37
|
+
|
38
|
+
def url
|
39
|
+
API_ENDPOINT % character_id
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'forwardable'
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
class CharacterFatigue < Base
|
6
|
+
extend Forwardable
|
7
|
+
|
8
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v1/characters/%s/fatigue/?datasource=tranquility'.freeze
|
9
|
+
|
10
|
+
attr_reader :character_id
|
11
|
+
|
12
|
+
def initialize(options)
|
13
|
+
super
|
14
|
+
|
15
|
+
@character_id = options[:character_id]
|
16
|
+
end
|
17
|
+
|
18
|
+
def_delegators :model, :as_json, :jump_fatigue_expire_date,
|
19
|
+
:last_jump_date, :last_update_date
|
20
|
+
|
21
|
+
def model
|
22
|
+
Models::Fatigue.new(response)
|
23
|
+
end
|
24
|
+
memoize :model
|
25
|
+
|
26
|
+
def scope
|
27
|
+
'esi-characters.read_fatigue.v1'
|
28
|
+
end
|
29
|
+
|
30
|
+
def url
|
31
|
+
API_ENDPOINT % character_id
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module EveOnline
|
2
|
+
module ESI
|
3
|
+
class CharacterImplants < Base
|
4
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v1/characters/%s/implants/?datasource=tranquility'.freeze
|
5
|
+
|
6
|
+
attr_reader :character_id
|
7
|
+
|
8
|
+
def initialize(options)
|
9
|
+
super
|
10
|
+
|
11
|
+
@character_id = options[:character_id]
|
12
|
+
end
|
13
|
+
|
14
|
+
def implants
|
15
|
+
response
|
16
|
+
end
|
17
|
+
|
18
|
+
def scope
|
19
|
+
'esi-clones.read_implants.v1'
|
20
|
+
end
|
21
|
+
|
22
|
+
def url
|
23
|
+
API_ENDPOINT % character_id
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module EveOnline
|
2
|
+
module ESI
|
3
|
+
class CharacterIndustryJobs < Base
|
4
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v1/characters/%s/industry/jobs/?datasource=tranquility&include_completed=%s'.freeze
|
5
|
+
|
6
|
+
attr_reader :character_id, :include_completed
|
7
|
+
|
8
|
+
def initialize(options)
|
9
|
+
super
|
10
|
+
|
11
|
+
@character_id = options[:character_id]
|
12
|
+
@include_completed = options[:include_completed] ? true : false
|
13
|
+
end
|
14
|
+
|
15
|
+
def jobs
|
16
|
+
output = []
|
17
|
+
response.each do |job|
|
18
|
+
output << Models::IndustryJob.new(job)
|
19
|
+
end
|
20
|
+
output
|
21
|
+
end
|
22
|
+
memoize :jobs
|
23
|
+
|
24
|
+
def scope
|
25
|
+
'esi-industry.read_character_jobs.v1'
|
26
|
+
end
|
27
|
+
|
28
|
+
def url
|
29
|
+
API_ENDPOINT % [character_id, include_completed]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -1,55 +1,27 @@
|
|
1
|
+
require 'forwardable'
|
2
|
+
|
1
3
|
module EveOnline
|
2
4
|
module ESI
|
3
5
|
class CharacterPortrait < Base
|
6
|
+
extend Forwardable
|
7
|
+
|
4
8
|
API_ENDPOINT = 'https://esi.tech.ccp.is/v2/characters/%s/portrait/?datasource=tranquility'.freeze
|
5
9
|
|
6
10
|
attr_reader :character_id
|
7
11
|
|
8
|
-
def initialize(
|
9
|
-
super
|
10
|
-
@character_id = character_id
|
11
|
-
end
|
12
|
-
|
13
|
-
# https://eveonline-third-party-documentation.readthedocs.io/en/latest/imageserver/intro.html#character-images
|
14
|
-
# Available Sizes: 32, 64, 128, 256, 512, 1024
|
15
|
-
# https://nethackwiki.com/wiki/Physical_size
|
16
|
-
# Tiny = 0; Small = 1; Medium = 2; Large = 3; Huge = 4; Gigantic = 7.
|
17
|
-
def as_json
|
18
|
-
{
|
19
|
-
small: small,
|
20
|
-
medium: medium,
|
21
|
-
large: large,
|
22
|
-
huge: huge
|
23
|
-
}
|
24
|
-
end
|
25
|
-
|
26
|
-
def tiny
|
27
|
-
# FIXME: https://github.com/ccpgames/esi-issues/issues/270
|
28
|
-
# FIXME: https://github.com/ccpgames/esi-issues/issues/131
|
29
|
-
raise NotImplementedError
|
30
|
-
end
|
31
|
-
|
32
|
-
def small
|
33
|
-
response['px64x64']
|
34
|
-
end
|
12
|
+
def initialize(options)
|
13
|
+
super
|
35
14
|
|
36
|
-
|
37
|
-
response['px128x128']
|
15
|
+
@character_id = options[:character_id]
|
38
16
|
end
|
39
17
|
|
40
|
-
|
41
|
-
|
42
|
-
end
|
43
|
-
|
44
|
-
def huge
|
45
|
-
response['px512x512']
|
46
|
-
end
|
18
|
+
def_delegators :model, :as_json, :tiny, :small, :medium, :large, :huge,
|
19
|
+
:gigantic
|
47
20
|
|
48
|
-
def
|
49
|
-
|
50
|
-
# FIXME: https://github.com/ccpgames/esi-issues/issues/131
|
51
|
-
raise NotImplementedError
|
21
|
+
def model
|
22
|
+
Models::CharacterPortrait.new(response)
|
52
23
|
end
|
24
|
+
memoize :model
|
53
25
|
|
54
26
|
def scope; end
|
55
27
|
|
@@ -1,19 +1,20 @@
|
|
1
1
|
module EveOnline
|
2
2
|
module ESI
|
3
3
|
class CharacterSkillQueue < Base
|
4
|
-
API_ENDPOINT = 'https://esi.tech.ccp.is/
|
4
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v2/characters/%s/skillqueue/?datasource=tranquility'.freeze
|
5
5
|
|
6
6
|
attr_reader :character_id
|
7
7
|
|
8
|
-
def initialize(
|
9
|
-
super
|
10
|
-
|
8
|
+
def initialize(options)
|
9
|
+
super
|
10
|
+
|
11
|
+
@character_id = options[:character_id]
|
11
12
|
end
|
12
13
|
|
13
14
|
def skills
|
14
15
|
output = []
|
15
16
|
response.each do |skill|
|
16
|
-
output <<
|
17
|
+
output << Models::SkillQueueEntry.new(skill)
|
17
18
|
end
|
18
19
|
output
|
19
20
|
end
|
@@ -1,13 +1,14 @@
|
|
1
1
|
module EveOnline
|
2
2
|
module ESI
|
3
3
|
class CharacterSkills < Base
|
4
|
-
API_ENDPOINT = 'https://esi.tech.ccp.is/
|
4
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v3/characters/%s/skills/?datasource=tranquility'.freeze
|
5
5
|
|
6
6
|
attr_reader :character_id
|
7
7
|
|
8
|
-
def initialize(
|
9
|
-
super
|
10
|
-
|
8
|
+
def initialize(options)
|
9
|
+
super
|
10
|
+
|
11
|
+
@character_id = options[:character_id]
|
11
12
|
end
|
12
13
|
|
13
14
|
def as_json
|
@@ -23,7 +24,7 @@ module EveOnline
|
|
23
24
|
def skills
|
24
25
|
output = []
|
25
26
|
response.fetch('skills').each do |skill|
|
26
|
-
output <<
|
27
|
+
output << Models::Skill.new(skill)
|
27
28
|
end
|
28
29
|
output
|
29
30
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module EveOnline
|
2
|
+
module ESI
|
3
|
+
class CharacterStandings < Base
|
4
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v1/characters/%s/standings/?datasource=tranquility'.freeze
|
5
|
+
|
6
|
+
attr_reader :character_id
|
7
|
+
|
8
|
+
def initialize(options)
|
9
|
+
super
|
10
|
+
|
11
|
+
@character_id = options[:character_id]
|
12
|
+
end
|
13
|
+
|
14
|
+
def standings
|
15
|
+
output = []
|
16
|
+
response.each do |standing|
|
17
|
+
output << Models::Standing.new(standing)
|
18
|
+
end
|
19
|
+
output
|
20
|
+
end
|
21
|
+
memoize :standings
|
22
|
+
|
23
|
+
def scope
|
24
|
+
'esi-characters.read_standings.v1'
|
25
|
+
end
|
26
|
+
|
27
|
+
def url
|
28
|
+
API_ENDPOINT % character_id
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module EveOnline
|
2
|
+
module ESI
|
3
|
+
class CharacterWallet < Base
|
4
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v1/characters/%s/wallet/?datasource=tranquility'.freeze
|
5
|
+
|
6
|
+
attr_reader :character_id
|
7
|
+
|
8
|
+
def initialize(options)
|
9
|
+
super
|
10
|
+
|
11
|
+
@character_id = options[:character_id]
|
12
|
+
end
|
13
|
+
|
14
|
+
def as_json
|
15
|
+
{
|
16
|
+
wallet: wallet
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
def wallet
|
21
|
+
response
|
22
|
+
end
|
23
|
+
|
24
|
+
def scope
|
25
|
+
'esi-wallet.read_character_wallet.v1'
|
26
|
+
end
|
27
|
+
|
28
|
+
def url
|
29
|
+
API_ENDPOINT % character_id
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'forwardable'
|
2
|
+
|
3
|
+
module EveOnline
|
4
|
+
module ESI
|
5
|
+
class Corporation < Base
|
6
|
+
extend Forwardable
|
7
|
+
|
8
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v3/corporations/%s/?datasource=tranquility'.freeze
|
9
|
+
|
10
|
+
attr_reader :corporation_id
|
11
|
+
|
12
|
+
def initialize(options)
|
13
|
+
super
|
14
|
+
|
15
|
+
@corporation_id = options[:corporation_id]
|
16
|
+
end
|
17
|
+
|
18
|
+
def_delegators :model, :as_json, :alliance_id, :ceo_id,
|
19
|
+
:corporation_description, :corporation_name,
|
20
|
+
:creation_date, :creator_id, :faction,
|
21
|
+
:member_count, :tax_rate, :ticker, :corporation_url
|
22
|
+
|
23
|
+
def model
|
24
|
+
Models::Corporation.new(response)
|
25
|
+
end
|
26
|
+
memoize :model
|
27
|
+
|
28
|
+
def scope; end
|
29
|
+
|
30
|
+
def url
|
31
|
+
API_ENDPOINT % corporation_id
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module EveOnline
|
2
|
+
module ESI
|
3
|
+
class CorporationIndustryJobs < Base
|
4
|
+
API_ENDPOINT = 'https://esi.tech.ccp.is/v1/corporations/%s/industry/jobs/?datasource=tranquility&include_completed=%s'.freeze
|
5
|
+
|
6
|
+
attr_reader :corporation_id, :include_completed
|
7
|
+
|
8
|
+
def initialize(options)
|
9
|
+
super
|
10
|
+
|
11
|
+
@corporation_id = options[:corporation_id]
|
12
|
+
@include_completed = options[:include_completed] ? true : false
|
13
|
+
end
|
14
|
+
|
15
|
+
def jobs
|
16
|
+
output = []
|
17
|
+
response.each do |job|
|
18
|
+
output << Models::IndustryJob.new(job)
|
19
|
+
end
|
20
|
+
output
|
21
|
+
end
|
22
|
+
memoize :jobs
|
23
|
+
|
24
|
+
def scope
|
25
|
+
'esi-industry.read_corporation_jobs.v1'
|
26
|
+
end
|
27
|
+
|
28
|
+
def url
|
29
|
+
API_ENDPOINT % [corporation_id, include_completed]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|