Class: EveOnline::ESI::CharacterBlueprints

Inherits:
Base
  • Object
show all
Defined in:
lib/eve_online/esi/character_blueprints.rb

Constant Summary collapse

API_ENDPOINT =
'https://esi.tech.ccp.is/v2/characters/%<character_id>s/blueprints/?datasource=tranquility&page=1'

Instance Attribute Summary collapse

Attributes inherited from Base

#parser, #token

Instance Method Summary collapse

Methods inherited from Base

#content, #response, #user_agent

Constructor Details

#initialize(options) ⇒ CharacterBlueprints

Returns a new instance of CharacterBlueprints.



10
11
12
13
14
# File 'lib/eve_online/esi/character_blueprints.rb', line 10

def initialize(options)
  super

  @character_id = options[:character_id]
end

Instance Attribute Details

#character_idObject (readonly)

Returns the value of attribute character_id.



8
9
10
# File 'lib/eve_online/esi/character_blueprints.rb', line 8

def character_id
  @character_id
end

Instance Method Details

#blueprintsObject



16
17
18
19
20
21
22
# File 'lib/eve_online/esi/character_blueprints.rb', line 16

def blueprints
  output = []
  response.each do |blueprint|
    output << Models::Blueprint.new(blueprint)
  end
  output
end

#scopeObject



25
26
27
# File 'lib/eve_online/esi/character_blueprints.rb', line 25

def scope
  'esi-characters.read_blueprints.v1'
end

#urlObject



29
30
31
# File 'lib/eve_online/esi/character_blueprints.rb', line 29

def url
  format(API_ENDPOINT, character_id: character_id)
end