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.
Files changed (120) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +0 -1
  3. data/.rubocop-thread_safety.yml +9 -0
  4. data/.rubocop.yml +26 -102
  5. data/.rubocop_general.yml +94 -0
  6. data/.rubocop_rspec.yml +61 -0
  7. data/.rubocop_todo.yml +0 -0
  8. data/.travis.yml +14 -29
  9. data/CHANGELOG.md +329 -0
  10. data/Gemfile +1 -2
  11. data/README.md +840 -1088
  12. data/eve_online.gemspec +8 -8
  13. data/lib/eve_online.rb +45 -59
  14. data/lib/eve_online/esi/alliance.rb +33 -0
  15. data/lib/eve_online/esi/alliance_icon.rb +32 -0
  16. data/lib/eve_online/esi/base.rb +3 -2
  17. data/lib/eve_online/esi/bloodlines.rb +22 -0
  18. data/lib/eve_online/esi/character.rb +13 -56
  19. data/lib/eve_online/esi/character_assets.rb +32 -0
  20. data/lib/eve_online/esi/character_attributes.rb +36 -0
  21. data/lib/eve_online/esi/character_blueprints.rb +32 -0
  22. data/lib/eve_online/esi/character_clones.rb +43 -0
  23. data/lib/eve_online/esi/character_fatigue.rb +35 -0
  24. data/lib/eve_online/esi/character_implants.rb +27 -0
  25. data/lib/eve_online/esi/character_industry_jobs.rb +33 -0
  26. data/lib/eve_online/esi/character_loyalty_points.rb +4 -3
  27. data/lib/eve_online/esi/character_portrait.rb +12 -40
  28. data/lib/eve_online/esi/character_skill_queue.rb +6 -5
  29. data/lib/eve_online/esi/character_skills.rb +6 -5
  30. data/lib/eve_online/esi/character_standings.rb +32 -0
  31. data/lib/eve_online/esi/character_wallet.rb +33 -0
  32. data/lib/eve_online/esi/corporation.rb +35 -0
  33. data/lib/eve_online/esi/corporation_industry_jobs.rb +33 -0
  34. data/lib/eve_online/esi/dogma_attribute.rb +34 -0
  35. data/lib/eve_online/esi/dogma_attributes.rb +17 -0
  36. data/lib/eve_online/esi/factions.rb +22 -0
  37. data/lib/eve_online/esi/models/alliance.rb +34 -0
  38. data/lib/eve_online/esi/models/alliance_icon.rb +22 -0
  39. data/lib/eve_online/esi/models/asset.rb +47 -0
  40. data/lib/eve_online/esi/models/attributes.rb +56 -0
  41. data/lib/eve_online/esi/models/base.rb +21 -0
  42. data/lib/eve_online/esi/models/bloodline.rb +67 -0
  43. data/lib/eve_online/esi/models/blueprint.rb +52 -0
  44. data/lib/eve_online/esi/models/character.rb +64 -0
  45. data/lib/eve_online/esi/models/character_portrait.rb +48 -0
  46. data/lib/eve_online/esi/models/corporation.rb +69 -0
  47. data/lib/eve_online/esi/models/dogma_attribute.rb +62 -0
  48. data/lib/eve_online/esi/models/faction.rb +62 -0
  49. data/lib/eve_online/esi/models/fatigue.rb +33 -0
  50. data/lib/eve_online/esi/models/home_location.rb +22 -0
  51. data/lib/eve_online/esi/models/industry_job.rb +130 -0
  52. data/lib/eve_online/esi/models/jump_clone.rb +27 -0
  53. data/lib/eve_online/esi/models/loyalty_point.rb +1 -7
  54. data/lib/eve_online/esi/models/race.rb +32 -0
  55. data/lib/eve_online/esi/models/server_status.rb +34 -0
  56. data/lib/eve_online/esi/models/skill.rb +1 -7
  57. data/lib/eve_online/esi/models/skill_queue_entry.rb +13 -17
  58. data/lib/eve_online/esi/models/standing.rb +27 -0
  59. data/lib/eve_online/esi/races.rb +22 -0
  60. data/lib/eve_online/esi/server_status.rb +8 -24
  61. data/lib/eve_online/version.rb +1 -1
  62. metadata +67 -83
  63. data/.codeclimate.yml +0 -11
  64. data/.editorconfig +0 -10
  65. data/.rspec +0 -1
  66. data/lib/eve_online/base_crest.rb +0 -11
  67. data/lib/eve_online/blueprint.rb +0 -60
  68. data/lib/eve_online/character.rb +0 -54
  69. data/lib/eve_online/character_implants.rb +0 -29
  70. data/lib/eve_online/character_jump_clone_implants.rb +0 -29
  71. data/lib/eve_online/character_jump_clones.rb +0 -29
  72. data/lib/eve_online/character_skills.rb +0 -29
  73. data/lib/eve_online/eve/character_id.rb +0 -41
  74. data/lib/eve_online/implant.rb +0 -24
  75. data/lib/eve_online/item.rb +0 -49
  76. data/lib/eve_online/jump_clone.rb +0 -34
  77. data/lib/eve_online/jump_clone_implant.rb +0 -29
  78. data/lib/eve_online/sde/chr_races.rb +0 -14
  79. data/lib/eve_online/sde/models/chr_race.rb +0 -38
  80. data/lib/eve_online/skill.rb +0 -34
  81. data/lib/eve_online/sovereignty/campaigns.rb +0 -28
  82. data/lib/eve_online/standing.rb +0 -29
  83. data/lib/eve_online/xml/account_characters.rb +0 -48
  84. data/lib/eve_online/xml/account_status.rb +0 -31
  85. data/lib/eve_online/xml/api_key_info.rb +0 -63
  86. data/lib/eve_online/xml/character_account_balance.rb +0 -59
  87. data/lib/eve_online/xml/character_asset_list.rb +0 -54
  88. data/lib/eve_online/xml/character_blueprints.rb +0 -53
  89. data/lib/eve_online/xml/character_calendar_event_attendees.rb +0 -24
  90. data/lib/eve_online/xml/character_chat_channels.rb +0 -25
  91. data/lib/eve_online/xml/character_contact_list.rb +0 -25
  92. data/lib/eve_online/xml/character_contract_bids.rb +0 -23
  93. data/lib/eve_online/xml/character_contract_items.rb +0 -24
  94. data/lib/eve_online/xml/character_contracts.rb +0 -26
  95. data/lib/eve_online/xml/character_fac_war_stats.rb +0 -23
  96. data/lib/eve_online/xml/character_industry_jobs.rb +0 -23
  97. data/lib/eve_online/xml/character_industry_jobs_history.rb +0 -23
  98. data/lib/eve_online/xml/character_kill_mails.rb +0 -25
  99. data/lib/eve_online/xml/character_locations.rb +0 -32
  100. data/lib/eve_online/xml/character_mail_bodies.rb +0 -30
  101. data/lib/eve_online/xml/character_mail_messages.rb +0 -23
  102. data/lib/eve_online/xml/character_mailing_lists.rb +0 -23
  103. data/lib/eve_online/xml/character_medals.rb +0 -23
  104. data/lib/eve_online/xml/character_notification_texts.rb +0 -32
  105. data/lib/eve_online/xml/character_notifications.rb +0 -23
  106. data/lib/eve_online/xml/character_planetary_colonies.rb +0 -23
  107. data/lib/eve_online/xml/character_planetary_links.rb +0 -24
  108. data/lib/eve_online/xml/character_planetary_pins.rb +0 -24
  109. data/lib/eve_online/xml/character_planetary_routes.rb +0 -24
  110. data/lib/eve_online/xml/character_research.rb +0 -23
  111. data/lib/eve_online/xml/character_sheet.rb +0 -231
  112. data/lib/eve_online/xml/character_skill_in_training.rb +0 -68
  113. data/lib/eve_online/xml/character_skill_queue.rb +0 -51
  114. data/lib/eve_online/xml/character_standings.rb +0 -67
  115. data/lib/eve_online/xml/character_wallet_transactions.rb +0 -24
  116. data/lib/eve_online/xml/models/account_status.rb +0 -40
  117. data/lib/eve_online/xml/models/account_type_object.rb +0 -22
  118. data/lib/eve_online/xml/models/api_key_info.rb +0 -35
  119. data/lib/eve_online/xml/models/skill_queue_entry.rb +0 -55
  120. data/lib/eve_online/xml/server_status.rb +0 -31
@@ -1,11 +0,0 @@
1
- ---
2
- engines:
3
- rubocop:
4
- enabled: true
5
- fixme:
6
- enabled: true
7
- ratings:
8
- paths:
9
- - "**.rb"
10
- exclude_paths:
11
- - spec/**/*
@@ -1,10 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = space
5
- indent_size = 2
6
- end_of_line = lf
7
- charset = utf-8
8
- trim_trailing_whitespace = true
9
- insert_final_newline = true
10
-
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
@@ -1,11 +0,0 @@
1
- require 'json'
2
-
3
- module EveOnline
4
- class BaseCREST < Base
5
- attr_reader :parser
6
-
7
- def initialize
8
- @parser = JSON
9
- end
10
- end
11
- end
@@ -1,60 +0,0 @@
1
- module EveOnline
2
- class Blueprint
3
- attr_reader :options
4
-
5
- def initialize(options)
6
- @options = options
7
- end
8
-
9
- def as_json
10
- {
11
- item_id: item_id,
12
- location_id: location_id,
13
- type_id: type_id,
14
- type_name: type_name,
15
- flag_id: flag_id,
16
- quantity: quantity,
17
- time_efficiency: time_efficiency,
18
- material_efficiency: material_efficiency,
19
- runs: runs
20
- }
21
- end
22
-
23
- def item_id
24
- options.fetch('@itemID').to_i
25
- end
26
-
27
- def location_id
28
- options.fetch('@locationID').to_i
29
- end
30
-
31
- def type_id
32
- options.fetch('@typeID').to_i
33
- end
34
-
35
- def type_name
36
- options.fetch('@typeName')
37
- end
38
-
39
- def flag_id
40
- options.fetch('@flagID').to_i
41
- end
42
-
43
- # TODO: return EveOnline::Blueprint::Quantity
44
- def quantity
45
- options.fetch('@quantity').to_i
46
- end
47
-
48
- def time_efficiency
49
- options.fetch('@timeEfficiency').to_i
50
- end
51
-
52
- def material_efficiency
53
- options.fetch('@materialEfficiency').to_i
54
- end
55
-
56
- def runs
57
- options.fetch('@runs').to_i
58
- end
59
- end
60
- end
@@ -1,54 +0,0 @@
1
- module EveOnline
2
- class Character
3
- attr_reader :options
4
-
5
- def initialize(options)
6
- @options = options
7
- end
8
-
9
- def as_json
10
- {
11
- character_id: character_id,
12
- character_name: character_name,
13
- corporation_id: corporation_id,
14
- corporation_name: corporation_name,
15
- alliance_id: alliance_id,
16
- alliance_name: alliance_name,
17
- faction_id: faction_id,
18
- faction_name: faction_name
19
- }
20
- end
21
-
22
- def character_id
23
- options.fetch('@characterID').to_i
24
- end
25
-
26
- def character_name
27
- options.fetch('@name', nil) || options.fetch('@characterName')
28
- end
29
-
30
- def corporation_id
31
- options.fetch('@corporationID').to_i
32
- end
33
-
34
- def corporation_name
35
- options.fetch('@corporationName')
36
- end
37
-
38
- def alliance_id
39
- options.fetch('@allianceID').to_i
40
- end
41
-
42
- def alliance_name
43
- options.fetch('@allianceName')
44
- end
45
-
46
- def faction_id
47
- options.fetch('@factionID').to_i
48
- end
49
-
50
- def faction_name
51
- options.fetch('@factionName')
52
- end
53
- end
54
- end
@@ -1,29 +0,0 @@
1
- require 'memoist'
2
-
3
- module EveOnline
4
- class CharacterImplants
5
- extend Memoist
6
-
7
- attr_reader :result
8
-
9
- def initialize(result)
10
- @result = result
11
- end
12
-
13
- def implants
14
- output = []
15
- rowset.each do |implant|
16
- output << Implant.new(implant)
17
- end
18
- output
19
- end
20
- memoize :implants
21
-
22
- private
23
-
24
- def rowset
25
- result.fetch('rowset').reject { |a| a.fetch('@name') != 'implants' }.first.fetch('row')
26
- end
27
- memoize :rowset
28
- end
29
- end
@@ -1,29 +0,0 @@
1
- require 'memoist'
2
-
3
- module EveOnline
4
- class CharacterJumpCloneImplants
5
- extend Memoist
6
-
7
- attr_reader :result
8
-
9
- def initialize(result)
10
- @result = result
11
- end
12
-
13
- def jump_clone_implants
14
- output = []
15
- rowset.each do |jump_clone_implant|
16
- output << JumpCloneImplant.new(jump_clone_implant)
17
- end
18
- output
19
- end
20
- memoize :jump_clone_implants
21
-
22
- private
23
-
24
- def rowset
25
- result.fetch('rowset').reject { |a| a.fetch('@name') != 'jumpCloneImplants' }.first.fetch('row')
26
- end
27
- memoize :rowset
28
- end
29
- end
@@ -1,29 +0,0 @@
1
- require 'memoist'
2
-
3
- module EveOnline
4
- class CharacterJumpClones
5
- extend Memoist
6
-
7
- attr_reader :result
8
-
9
- def initialize(result)
10
- @result = result
11
- end
12
-
13
- def jump_clones
14
- output = []
15
- rowset.each do |jump_clone|
16
- output << JumpClone.new(jump_clone)
17
- end
18
- output
19
- end
20
- memoize :jump_clones
21
-
22
- private
23
-
24
- def rowset
25
- result.fetch('rowset').reject { |a| a.fetch('@name') != 'jumpClones' }.first.fetch('row')
26
- end
27
- memoize :rowset
28
- end
29
- end
@@ -1,29 +0,0 @@
1
- require 'memoist'
2
-
3
- module EveOnline
4
- class CharacterSkills
5
- extend Memoist
6
-
7
- attr_reader :result
8
-
9
- def initialize(result)
10
- @result = result
11
- end
12
-
13
- def skills
14
- output = []
15
- rowset.each do |skill|
16
- output << Skill.new(skill)
17
- end
18
- output
19
- end
20
- memoize :skills
21
-
22
- private
23
-
24
- def rowset
25
- result.fetch('rowset').reject { |a| a.fetch('@name') != 'skills' }.first.fetch('row')
26
- end
27
- memoize :rowset
28
- end
29
- end
@@ -1,41 +0,0 @@
1
- require 'uri'
2
-
3
- module EveOnline
4
- module Eve
5
- # https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/eve/eve_characterid.html
6
- class CharacterID < BaseXML
7
- API_ENDPOINT = 'https://api.eveonline.com/eve/CharacterID.xml.aspx'.freeze
8
-
9
- attr_reader :input
10
-
11
- def initialize(input)
12
- super()
13
- @input = input
14
- end
15
-
16
- def characters
17
- # TODO: implement
18
- raise NotImplementedError
19
- end
20
-
21
- def names
22
- case input
23
- when String
24
- input
25
- when Array
26
- input.join(',')
27
- else
28
- raise ArgumentError
29
- end
30
- end
31
-
32
- def escaped_input
33
- URI.escape(names)
34
- end
35
-
36
- def url
37
- "#{ API_ENDPOINT }?names=#{ escaped_input }"
38
- end
39
- end
40
- end
41
- end
@@ -1,24 +0,0 @@
1
- module EveOnline
2
- class Implant
3
- attr_reader :options
4
-
5
- def initialize(options)
6
- @options = options
7
- end
8
-
9
- def as_json
10
- {
11
- type_id: type_id,
12
- type_name: type_name
13
- }
14
- end
15
-
16
- def type_id
17
- options.fetch('@typeID').to_i
18
- end
19
-
20
- def type_name
21
- options.fetch('@typeName')
22
- end
23
- end
24
- end
@@ -1,49 +0,0 @@
1
- module EveOnline
2
- class Item
3
- attr_reader :options
4
-
5
- def initialize(options)
6
- @options = options
7
- end
8
-
9
- def as_json
10
- {
11
- item_id: item_id,
12
- location_id: location_id,
13
- type_id: type_id,
14
- quantity: quantity,
15
- flag: flag,
16
- singleton: singleton,
17
- raw_quantity: raw_quantity
18
- }
19
- end
20
-
21
- def item_id
22
- options.fetch('@itemID').to_i
23
- end
24
-
25
- def location_id
26
- options.fetch('@locationID').to_i
27
- end
28
-
29
- def type_id
30
- options.fetch('@typeID').to_i
31
- end
32
-
33
- def quantity
34
- options.fetch('@quantity').to_i
35
- end
36
-
37
- def flag
38
- options.fetch('@flag').to_i
39
- end
40
-
41
- def singleton
42
- options.fetch('@singleton').to_i
43
- end
44
-
45
- def raw_quantity
46
- options.fetch('@rawQuantity').to_i
47
- end
48
- end
49
- end
@@ -1,34 +0,0 @@
1
- module EveOnline
2
- class JumpClone
3
- attr_reader :options
4
-
5
- def initialize(options)
6
- @options = options
7
- end
8
-
9
- def as_json
10
- {
11
- jump_clone_id: jump_clone_id,
12
- type_id: type_id,
13
- location_id: location_id,
14
- clone_name: clone_name
15
- }
16
- end
17
-
18
- def jump_clone_id
19
- options.fetch('@jumpCloneID').to_i
20
- end
21
-
22
- def type_id
23
- options.fetch('@typeID').to_i
24
- end
25
-
26
- def location_id
27
- options.fetch('@locationID').to_i
28
- end
29
-
30
- def clone_name
31
- options.fetch('@cloneName')
32
- end
33
- end
34
- end
@@ -1,29 +0,0 @@
1
- module EveOnline
2
- class JumpCloneImplant
3
- attr_reader :options
4
-
5
- def initialize(options)
6
- @options = options
7
- end
8
-
9
- def as_json
10
- {
11
- jump_clone_id: jump_clone_id,
12
- type_id: type_id,
13
- type_name: type_name
14
- }
15
- end
16
-
17
- def jump_clone_id
18
- options.fetch('@jumpCloneID').to_i
19
- end
20
-
21
- def type_id
22
- options.fetch('@typeID').to_i
23
- end
24
-
25
- def type_name
26
- options.fetch('@typeName')
27
- end
28
- end
29
- end