esi 0.4.20 → 0.4.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b33d8ae67547c173e0887b96458fcb2e80683cb7d192797c03c4263d06b4dd4
4
- data.tar.gz: 93e60e80daa2297e86a9f3d2b9ce57beeafe2d3f901f4ab51017a7bf8358b181
3
+ metadata.gz: 6445f97d24e7c39a1d2535a380d48fdd9f7cc8a02478620be5eeb855bfebbf3a
4
+ data.tar.gz: 53fa4257ead7a3c273e377dbcc190a1bfa488ad97ce8fbfe39865d1b448296a7
5
5
  SHA512:
6
- metadata.gz: eb1488cebfe108f0185a9ecd257557d9fcc9b361b6b3e05d126da58b8a8555dccd1e3abedf9f8ad1ce21f4c9f721213d5d74b359cb2db6522530c141ebd08ad4
7
- data.tar.gz: db711689340ad1695c78d935ace7ad185c968fb7b0d659f879da9fe72201d14cfbc4ce9232320666e8eb88f5b2933b36344f19a1a76675930f24df00d72db13a
6
+ metadata.gz: 60e70596309b79ce570982348162f968c803067f448707ad0b8bd8476f50d162a29b8debaa37efbbc76b6043b98467ab980c54a0e88706f20c9a9369862708b4
7
+ data.tar.gz: 0a2ec295ee089fc160132eaee458b95add0b0b902ed78756a6512a1da0873f6279fabf86025fb7978e8c2c6457ff25a63a8d49eea065456b9f669ab1b47fee29
@@ -11,6 +11,7 @@ require 'esi/calls/fittings'
11
11
  require 'esi/calls/fleets'
12
12
  require 'esi/calls/industry'
13
13
  require 'esi/calls/killmails'
14
+ require 'esi/calls/location'
14
15
  require 'esi/calls/markets'
15
16
  require 'esi/calls/route'
16
17
  require 'esi/calls/search'
@@ -19,7 +19,6 @@ module Esi
19
19
  end
20
20
  end
21
21
 
22
- # Cache: 2 minutes
23
22
  class CharacterWallet < Base
24
23
  self.scope = 'esi-wallet.read_character_wallet.v1'
25
24
  self.cache_duration = 120
@@ -123,15 +122,6 @@ module Esi
123
122
  end
124
123
  end
125
124
 
126
- class CharacterLocation < Base
127
- self.scope = 'esi-location.read_location.v1'
128
- self.cache_duration = 5
129
-
130
- def initialize(character_id)
131
- @path = "/characters/#{character_id}/location"
132
- end
133
- end
134
-
135
125
  class CharacterMail < Base
136
126
  self.scope = 'esi-mail.read_mail.v1'
137
127
  self.cache_duration = 30
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Esi
4
+ class Calls
5
+ # Get the character's online status
6
+ # @see https://esi.evetech.net/ui/#/Location/get_characters_character_id_online
7
+ #
8
+ # @param [Integer] character id to fetch the data from
9
+ #
10
+ # @return [Hash]
11
+ # * :online [Boolean] If the character is online
12
+ # * :last_login [String, nil] Timestamp of the last login
13
+ # * :last_logout [String, nil] Timestamp of the last logout
14
+ # * :logins [Integer, nil] Total number of times the character has logged in
15
+ class CharacterOnline < Base
16
+ self.scope = 'esi-location.read_online.v1'
17
+ self.cache_duration = 60
18
+
19
+ def initialize(character_id)
20
+ @path = "/characters/#{character_id}/online"
21
+ end
22
+ end
23
+
24
+ # Get the character's current location
25
+ # @see https://esi.evetech.net/ui/#/Location/get_characters_character_id_location
26
+ #
27
+ # @param [Integer] character id to fetch the data from
28
+ #
29
+ # @return [Hash]
30
+ # * :solar_system_id [Integer]
31
+ # * :station_id [Integer, nil]
32
+ # * :structure_id [Integer, nil]
33
+ class CharacterLocation < Base
34
+ self.scope = 'esi-location.read_location.v1'
35
+ self.cache_duration = 5
36
+
37
+ def initialize(character_id)
38
+ @path = "/characters/#{character_id}/location"
39
+ end
40
+ end
41
+
42
+ # Get the character's active ship
43
+ # @see https://esi.evetech.net/ui/#/Location/get_characters_character_id_ship
44
+ #
45
+ # @param [Integer] character id to fetch the data from
46
+ #
47
+ # @return [Hash]
48
+ # * :ship_item_id [Integer]
49
+ # * :ship_type_id [Integer]
50
+ # * :ship_name [String]
51
+ class CharacterShip < Base
52
+ self.scope = 'esi-location.read_ship_type.v1'
53
+ self.cache_duration = 5
54
+
55
+ def initialize(character_id)
56
+ @path = "/characters/#{character_id}/ship"
57
+ end
58
+ end
59
+ end
60
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Esi
4
- VERSION = '0.4.20'
4
+ VERSION = '0.4.21'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.20
4
+ version: 0.4.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Hiemstra
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-05-04 00:00:00.000000000 Z
12
+ date: 2018-05-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -162,6 +162,7 @@ files:
162
162
  - lib/esi/calls/industry.rb
163
163
  - lib/esi/calls/info.rb
164
164
  - lib/esi/calls/killmails.rb
165
+ - lib/esi/calls/location.rb
165
166
  - lib/esi/calls/markets.rb
166
167
  - lib/esi/calls/route.rb
167
168
  - lib/esi/calls/search.rb