eve_online 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +10 -0
  3. data/.rubocop.yml +2 -7
  4. data/.travis.yml +4 -1
  5. data/Gemfile +1 -1
  6. data/README.md +273 -7
  7. data/eve_online.gemspec +4 -2
  8. data/lib/eve_online.rb +32 -2
  9. data/lib/eve_online/characters/skill_queue.rb +3 -3
  10. data/lib/eve_online/esi/base.rb +15 -2
  11. data/lib/eve_online/esi/character.rb +75 -0
  12. data/lib/eve_online/esi/character_loyalty_points.rb +31 -0
  13. data/lib/eve_online/esi/character_portrait.rb +61 -0
  14. data/lib/eve_online/esi/character_skill_queue.rb +31 -0
  15. data/lib/eve_online/esi/character_skills.rb +41 -0
  16. data/lib/eve_online/esi/models/loyalty_point.rb +28 -0
  17. data/lib/eve_online/esi/models/skill.rb +33 -0
  18. data/lib/eve_online/esi/models/skill_queue_entry.rb +60 -0
  19. data/lib/eve_online/sde/agt_agent_types.rb +14 -0
  20. data/lib/eve_online/sde/agt_agents.rb +14 -0
  21. data/lib/eve_online/sde/agt_research_agents.rb +14 -0
  22. data/lib/eve_online/sde/base.rb +25 -0
  23. data/lib/eve_online/sde/chr_races.rb +14 -0
  24. data/lib/eve_online/sde/inv_flags.rb +14 -0
  25. data/lib/eve_online/sde/inv_items.rb +14 -0
  26. data/lib/eve_online/sde/inv_names.rb +14 -0
  27. data/lib/eve_online/sde/inv_positions.rb +14 -0
  28. data/lib/eve_online/sde/models/agt_agent.rb +58 -0
  29. data/lib/eve_online/sde/models/agt_agent_type.rb +28 -0
  30. data/lib/eve_online/sde/models/agt_research_agent.rb +28 -0
  31. data/lib/eve_online/sde/models/chr_race.rb +38 -0
  32. data/lib/eve_online/sde/models/inv_flag.rb +38 -0
  33. data/lib/eve_online/sde/models/inv_item.rb +48 -0
  34. data/lib/eve_online/sde/models/inv_name.rb +28 -0
  35. data/lib/eve_online/sde/models/inv_position.rb +53 -0
  36. data/lib/eve_online/version.rb +1 -1
  37. data/lib/eve_online/xml/models/skill_queue_entry.rb +55 -0
  38. metadata +31 -6
  39. data/lib/eve_online/esi/characters/character.rb +0 -20
  40. data/lib/eve_online/skill_queue_entry.rb +0 -51
@@ -0,0 +1,14 @@
1
+ module EveOnline
2
+ module SDE
3
+ class AgtAgents < Base
4
+ def agt_agents
5
+ output = []
6
+ data.each do |agt_agent|
7
+ output << EveOnline::SDE::Models::AgtAgent.new(agt_agent)
8
+ end
9
+ output
10
+ end
11
+ memoize :agt_agents
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EveOnline
2
+ module SDE
3
+ class AgtResearchAgents < Base
4
+ def agt_research_agents
5
+ output = []
6
+ data.each do |agt_research_agent|
7
+ output << EveOnline::SDE::Models::AgtResearchAgent.new(agt_research_agent)
8
+ end
9
+ output
10
+ end
11
+ memoize :agt_research_agents
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,25 @@
1
+ require 'memoist'
2
+
3
+ module EveOnline
4
+ module SDE
5
+ class Base
6
+ extend Memoist
7
+
8
+ attr_reader :file
9
+
10
+ def initialize(file)
11
+ @file = file
12
+ end
13
+
14
+ def content
15
+ File.read(file)
16
+ end
17
+ memoize :content
18
+
19
+ def data
20
+ YAML.safe_load(content)
21
+ end
22
+ memoize :data
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,14 @@
1
+ module EveOnline
2
+ module SDE
3
+ class ChrRaces < Base
4
+ def chr_races
5
+ output = []
6
+ data.each do |chr_race|
7
+ output << EveOnline::SDE::Models::ChrRace.new(chr_race)
8
+ end
9
+ output
10
+ end
11
+ memoize :chr_races
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EveOnline
2
+ module SDE
3
+ class InvFlags < Base
4
+ def inv_flags
5
+ output = []
6
+ data.each do |inv_flag|
7
+ output << EveOnline::SDE::Models::InvFlag.new(inv_flag)
8
+ end
9
+ output
10
+ end
11
+ memoize :inv_flags
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EveOnline
2
+ module SDE
3
+ class InvItems < Base
4
+ def inv_items
5
+ output = []
6
+ data.each do |inv_item|
7
+ output << EveOnline::SDE::Models::InvItem.new(inv_item)
8
+ end
9
+ output
10
+ end
11
+ memoize :inv_items
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EveOnline
2
+ module SDE
3
+ class InvNames < Base
4
+ def inv_names
5
+ output = []
6
+ data.each do |inv_name|
7
+ output << EveOnline::SDE::Models::InvName.new(inv_name)
8
+ end
9
+ output
10
+ end
11
+ memoize :inv_names
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ module EveOnline
2
+ module SDE
3
+ class InvPositions < Base
4
+ def inv_positions
5
+ output = []
6
+ data.each do |inv_position|
7
+ output << EveOnline::SDE::Models::InvPosition.new(inv_position)
8
+ end
9
+ output
10
+ end
11
+ memoize :inv_positions
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,58 @@
1
+ module EveOnline
2
+ module SDE
3
+ module Models
4
+ class AgtAgent
5
+ attr_reader :data
6
+
7
+ def initialize(data)
8
+ @data = data
9
+ end
10
+
11
+ def as_json
12
+ {
13
+ agent_id: agent_id,
14
+ agent_type_id: agent_type_id,
15
+ corporation_id: corporation_id,
16
+ division_id: division_id,
17
+ is_locator: is_locator,
18
+ level: level,
19
+ location_id: location_id,
20
+ quality: quality
21
+ }
22
+ end
23
+
24
+ def agent_id
25
+ data['agentID']
26
+ end
27
+
28
+ def agent_type_id
29
+ data['agentTypeID']
30
+ end
31
+
32
+ def corporation_id
33
+ data['corporationID']
34
+ end
35
+
36
+ def division_id
37
+ data['divisionID']
38
+ end
39
+
40
+ def is_locator
41
+ data['isLocator']
42
+ end
43
+
44
+ def level
45
+ data['level']
46
+ end
47
+
48
+ def location_id
49
+ data['locationID']
50
+ end
51
+
52
+ def quality
53
+ data['quality']
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,28 @@
1
+ module EveOnline
2
+ module SDE
3
+ module Models
4
+ class AgtAgentType
5
+ attr_reader :data
6
+
7
+ def initialize(data)
8
+ @data = data
9
+ end
10
+
11
+ def as_json
12
+ {
13
+ agent_type: agent_type,
14
+ agent_type_id: agent_type_id
15
+ }
16
+ end
17
+
18
+ def agent_type
19
+ data['agentType']
20
+ end
21
+
22
+ def agent_type_id
23
+ data['agentTypeID']
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ module EveOnline
2
+ module SDE
3
+ module Models
4
+ class AgtResearchAgent
5
+ attr_reader :data
6
+
7
+ def initialize(data)
8
+ @data = data
9
+ end
10
+
11
+ def as_json
12
+ {
13
+ agent_id: agent_id,
14
+ type_id: type_id
15
+ }
16
+ end
17
+
18
+ def agent_id
19
+ data['agentID']
20
+ end
21
+
22
+ def type_id
23
+ data['typeID']
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,38 @@
1
+ module EveOnline
2
+ module SDE
3
+ module Models
4
+ class ChrRace
5
+ attr_reader :data
6
+
7
+ def initialize(data)
8
+ @data = data
9
+ end
10
+
11
+ def as_json
12
+ {
13
+ race_id: race_id,
14
+ race_name: race_name,
15
+ short_description: short_description,
16
+ description: description
17
+ }
18
+ end
19
+
20
+ def race_id
21
+ data['raceID']
22
+ end
23
+
24
+ def race_name
25
+ data['raceName']
26
+ end
27
+
28
+ def short_description
29
+ data['shortDescription']
30
+ end
31
+
32
+ def description
33
+ data['description']
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,38 @@
1
+ module EveOnline
2
+ module SDE
3
+ module Models
4
+ class InvFlag
5
+ attr_reader :data
6
+
7
+ def initialize(data)
8
+ @data = data
9
+ end
10
+
11
+ def as_json
12
+ {
13
+ flag_id: flag_id,
14
+ flag_name: flag_name,
15
+ flag_text: flag_text,
16
+ order_id: order_id
17
+ }
18
+ end
19
+
20
+ def flag_id
21
+ data['flagID']
22
+ end
23
+
24
+ def flag_name
25
+ data['flagName']
26
+ end
27
+
28
+ def flag_text
29
+ data['flagText']
30
+ end
31
+
32
+ def order_id
33
+ data['orderID']
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,48 @@
1
+ module EveOnline
2
+ module SDE
3
+ module Models
4
+ class InvItem
5
+ attr_reader :data
6
+
7
+ def initialize(data)
8
+ @data = data
9
+ end
10
+
11
+ def as_json
12
+ {
13
+ flag_id: flag_id,
14
+ item_id: item_id,
15
+ location_id: location_id,
16
+ owner_id: owner_id,
17
+ quantity: quantity,
18
+ type_id: type_id
19
+ }
20
+ end
21
+
22
+ def flag_id
23
+ data['flagID']
24
+ end
25
+
26
+ def item_id
27
+ data['itemID']
28
+ end
29
+
30
+ def location_id
31
+ data['locationID']
32
+ end
33
+
34
+ def owner_id
35
+ data['ownerID']
36
+ end
37
+
38
+ def quantity
39
+ data['quantity']
40
+ end
41
+
42
+ def type_id
43
+ data['typeID']
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,28 @@
1
+ module EveOnline
2
+ module SDE
3
+ module Models
4
+ class InvName
5
+ attr_reader :data
6
+
7
+ def initialize(data)
8
+ @data = data
9
+ end
10
+
11
+ def as_json
12
+ {
13
+ item_id: item_id,
14
+ item_name: item_name
15
+ }
16
+ end
17
+
18
+ def item_id
19
+ data['itemID']
20
+ end
21
+
22
+ def item_name
23
+ data['itemName']
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,53 @@
1
+ module EveOnline
2
+ module SDE
3
+ module Models
4
+ class InvPosition
5
+ attr_reader :data
6
+
7
+ def initialize(data)
8
+ @data = data
9
+ end
10
+
11
+ def as_json
12
+ {
13
+ item_id: item_id,
14
+ pitch: pitch,
15
+ roll: roll,
16
+ x: x,
17
+ y: y,
18
+ yaw: yaw,
19
+ z: z
20
+ }
21
+ end
22
+
23
+ def item_id
24
+ data['itemID']
25
+ end
26
+
27
+ def pitch
28
+ data['pitch']
29
+ end
30
+
31
+ def roll
32
+ data['roll']
33
+ end
34
+
35
+ def x
36
+ data['x']
37
+ end
38
+
39
+ def y
40
+ data['y']
41
+ end
42
+
43
+ def yaw
44
+ data['yaw']
45
+ end
46
+
47
+ def z
48
+ data['z']
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end