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
@@ -1,67 +0,0 @@
|
|
1
|
-
module EveOnline
|
2
|
-
module XML
|
3
|
-
# https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_standings.html
|
4
|
-
class CharacterStandings < Base
|
5
|
-
API_ENDPOINT = 'https://api.eveonline.com/char/Standings.xml.aspx'.freeze
|
6
|
-
|
7
|
-
ACCESS_MASK = 524_288
|
8
|
-
|
9
|
-
attr_reader :key_id, :v_code, :character_id
|
10
|
-
|
11
|
-
def initialize(key_id, v_code, character_id)
|
12
|
-
super()
|
13
|
-
@key_id = key_id
|
14
|
-
@v_code = v_code
|
15
|
-
@character_id = character_id
|
16
|
-
end
|
17
|
-
|
18
|
-
def agents
|
19
|
-
output = []
|
20
|
-
agents_rowset.each do |agent|
|
21
|
-
output << Standing.new(agent)
|
22
|
-
end
|
23
|
-
output
|
24
|
-
end
|
25
|
-
memoize :agents
|
26
|
-
|
27
|
-
def npc_corporations
|
28
|
-
output = []
|
29
|
-
npc_corporations_rowset.each do |agent|
|
30
|
-
output << Standing.new(agent)
|
31
|
-
end
|
32
|
-
output
|
33
|
-
end
|
34
|
-
memoize :npc_corporations
|
35
|
-
|
36
|
-
def factions
|
37
|
-
output = []
|
38
|
-
factions_rowset.each do |agent|
|
39
|
-
output << Standing.new(agent)
|
40
|
-
end
|
41
|
-
output
|
42
|
-
end
|
43
|
-
memoize :factions
|
44
|
-
|
45
|
-
def url
|
46
|
-
"#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }"
|
47
|
-
end
|
48
|
-
|
49
|
-
private
|
50
|
-
|
51
|
-
def agents_rowset
|
52
|
-
result.fetch('characterNPCStandings').fetch('rowset').reject { |a| a.fetch('@name') != 'agents' }.first.fetch('row')
|
53
|
-
end
|
54
|
-
memoize :agents_rowset
|
55
|
-
|
56
|
-
def npc_corporations_rowset
|
57
|
-
result.fetch('characterNPCStandings').fetch('rowset').reject { |a| a.fetch('@name') != 'NPCCorporations' }.first.fetch('row')
|
58
|
-
end
|
59
|
-
memoize :npc_corporations_rowset
|
60
|
-
|
61
|
-
def factions_rowset
|
62
|
-
result.fetch('characterNPCStandings').fetch('rowset').reject { |a| a.fetch('@name') != 'factions' }.first.fetch('row')
|
63
|
-
end
|
64
|
-
memoize :factions_rowset
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module EveOnline
|
2
|
-
module XML
|
3
|
-
# https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_wallettransactions.html
|
4
|
-
class CharacterWalletTransactions < Base
|
5
|
-
API_ENDPOINT = 'https://api.eveonline.com/char/WalletTransactions.xml.aspx'.freeze
|
6
|
-
|
7
|
-
ACCESS_MASK = 4_194_304
|
8
|
-
|
9
|
-
attr_reader :key_id, :v_code, :character_id # TODO: :account_key
|
10
|
-
|
11
|
-
def initialize(key_id, v_code, character_id) # TODO: account_key
|
12
|
-
super()
|
13
|
-
@key_id = key_id
|
14
|
-
@v_code = v_code
|
15
|
-
@character_id = character_id
|
16
|
-
# @account_key = account_key TODO: add
|
17
|
-
end
|
18
|
-
|
19
|
-
def url
|
20
|
-
"#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }"
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'active_support/time'
|
2
|
-
|
3
|
-
module EveOnline
|
4
|
-
module XML
|
5
|
-
module Models
|
6
|
-
class AccountStatus
|
7
|
-
attr_reader :options
|
8
|
-
|
9
|
-
def initialize(options)
|
10
|
-
@options = options
|
11
|
-
end
|
12
|
-
|
13
|
-
def as_json
|
14
|
-
{
|
15
|
-
paid_until: paid_until,
|
16
|
-
create_date: create_date,
|
17
|
-
logon_count: logon_count,
|
18
|
-
logon_minutes: logon_minutes
|
19
|
-
}
|
20
|
-
end
|
21
|
-
|
22
|
-
def paid_until
|
23
|
-
ActiveSupport::TimeZone['UTC'].parse(options.fetch('paidUntil'))
|
24
|
-
end
|
25
|
-
|
26
|
-
def create_date
|
27
|
-
ActiveSupport::TimeZone['UTC'].parse(options.fetch('createDate'))
|
28
|
-
end
|
29
|
-
|
30
|
-
def logon_count
|
31
|
-
options.fetch('logonCount').to_i
|
32
|
-
end
|
33
|
-
|
34
|
-
def logon_minutes
|
35
|
-
options.fetch('logonMinutes').to_i
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module EveOnline
|
2
|
-
module XML
|
3
|
-
module Models
|
4
|
-
class AccountTypeObject
|
5
|
-
STATUSES = { 'Character' => :character, 'Account' => :account,
|
6
|
-
'Corporation' => :corporation }.freeze
|
7
|
-
|
8
|
-
attr_reader :input
|
9
|
-
|
10
|
-
def initialize(input)
|
11
|
-
@input = input
|
12
|
-
end
|
13
|
-
|
14
|
-
def value
|
15
|
-
raise ArgumentError unless STATUSES.key?(input)
|
16
|
-
|
17
|
-
@value ||= STATUSES.fetch(input)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require 'active_support/time'
|
2
|
-
|
3
|
-
module EveOnline
|
4
|
-
module XML
|
5
|
-
module Models
|
6
|
-
class ApiKeyInfo
|
7
|
-
attr_reader :options
|
8
|
-
|
9
|
-
def initialize(options)
|
10
|
-
@options = options
|
11
|
-
end
|
12
|
-
|
13
|
-
def as_json
|
14
|
-
{
|
15
|
-
access_mask: access_mask,
|
16
|
-
api_key_type: api_key_type,
|
17
|
-
expires: expires
|
18
|
-
}
|
19
|
-
end
|
20
|
-
|
21
|
-
def access_mask
|
22
|
-
options.fetch('@accessMask').to_i
|
23
|
-
end
|
24
|
-
|
25
|
-
def api_key_type
|
26
|
-
AccountTypeObject.new(options.fetch('@type')).value
|
27
|
-
end
|
28
|
-
|
29
|
-
def expires
|
30
|
-
ActiveSupport::TimeZone['UTC'].parse(options.fetch('@expires'))
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
require 'active_support/time'
|
2
|
-
|
3
|
-
module EveOnline
|
4
|
-
module XML
|
5
|
-
module Models
|
6
|
-
class SkillQueueEntry
|
7
|
-
attr_reader :options
|
8
|
-
|
9
|
-
def initialize(options)
|
10
|
-
@options = options
|
11
|
-
end
|
12
|
-
|
13
|
-
def as_json
|
14
|
-
{
|
15
|
-
queue_position: queue_position,
|
16
|
-
type_id: type_id,
|
17
|
-
level: level,
|
18
|
-
start_sp: start_sp,
|
19
|
-
end_sp: end_sp,
|
20
|
-
start_time: start_time,
|
21
|
-
end_time: end_time
|
22
|
-
}
|
23
|
-
end
|
24
|
-
|
25
|
-
def queue_position
|
26
|
-
options.fetch('@queuePosition').to_i
|
27
|
-
end
|
28
|
-
|
29
|
-
def type_id
|
30
|
-
options.fetch('@typeID').to_i
|
31
|
-
end
|
32
|
-
|
33
|
-
def level
|
34
|
-
options.fetch('@level').to_i
|
35
|
-
end
|
36
|
-
|
37
|
-
def start_sp
|
38
|
-
options.fetch('@startSP').to_i
|
39
|
-
end
|
40
|
-
|
41
|
-
def end_sp
|
42
|
-
options.fetch('@endSP').to_i
|
43
|
-
end
|
44
|
-
|
45
|
-
def start_time
|
46
|
-
ActiveSupport::TimeZone['UTC'].parse(options.fetch('@startTime'))
|
47
|
-
end
|
48
|
-
|
49
|
-
def end_time
|
50
|
-
ActiveSupport::TimeZone['UTC'].parse(options.fetch('@endTime'))
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
module EveOnline
|
2
|
-
module XML
|
3
|
-
# https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/server/serv_serverstatus.html
|
4
|
-
class ServerStatus < Base
|
5
|
-
API_ENDPOINT = 'https://api.eveonline.com/Server/ServerStatus.xml.aspx'.freeze
|
6
|
-
|
7
|
-
def as_json
|
8
|
-
{
|
9
|
-
current_time: current_time,
|
10
|
-
cached_until: cached_until,
|
11
|
-
server_open: server_open,
|
12
|
-
online_players: online_players
|
13
|
-
}
|
14
|
-
end
|
15
|
-
|
16
|
-
def server_open
|
17
|
-
result.fetch('serverOpen') == 'True'
|
18
|
-
end
|
19
|
-
|
20
|
-
alias server_open? server_open
|
21
|
-
|
22
|
-
def online_players
|
23
|
-
result.fetch('onlinePlayers').to_i
|
24
|
-
end
|
25
|
-
|
26
|
-
def url
|
27
|
-
API_ENDPOINT
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|