Class: EveOnline::ESI::CharacterOnline
- Extended by:
- Forwardable
- Defined in:
- lib/eve_online/esi/character_online.rb
Constant Summary collapse
- API_ENDPOINT =
'https://esi.tech.ccp.is/v2/characters/%<character_id>s/online/?datasource=tranquility'
Instance Attribute Summary collapse
-
#character_id ⇒ Object
readonly
Returns the value of attribute character_id.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options) ⇒ CharacterOnline
constructor
A new instance of CharacterOnline.
- #model ⇒ Object
- #scope ⇒ Object
- #url ⇒ Object
Methods inherited from Base
#content, #response, #user_agent
Constructor Details
#initialize(options) ⇒ CharacterOnline
Returns a new instance of CharacterOnline.
14 15 16 17 18 |
# File 'lib/eve_online/esi/character_online.rb', line 14 def initialize() super @character_id = [:character_id] end |
Instance Attribute Details
#character_id ⇒ Object (readonly)
Returns the value of attribute character_id.
12 13 14 |
# File 'lib/eve_online/esi/character_online.rb', line 12 def character_id @character_id end |
Instance Method Details
#model ⇒ Object
23 24 25 |
# File 'lib/eve_online/esi/character_online.rb', line 23 def model Models::Online.new(response) end |
#scope ⇒ Object
28 29 30 |
# File 'lib/eve_online/esi/character_online.rb', line 28 def scope 'esi-location.read_online.v1' end |
#url ⇒ Object
32 33 34 |
# File 'lib/eve_online/esi/character_online.rb', line 32 def url format(API_ENDPOINT, character_id: character_id) end |