Class: EveOnline::ESI::WarKillmails

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

Constant Summary collapse

API_PATH =
"/v1/wars/%<war_id>s/killmails/"

Constants inherited from Base

Base::API_HOST

Instance Attribute Summary collapse

Attributes inherited from Base

#_open_timeout, #_read_timeout, #_write_timeout, #adapter, #language, #middlewares, #token

Instance Method Summary collapse

Methods inherited from Base

#add_middleware, #base_query_params, #connection, #error_limit_remain, #error_limit_reset, #http_method, #open_timeout, #open_timeout=, #query, #read_timeout, #read_timeout=, #request_id, #resource, #response, #total_pages, #uri, #url, #user_agent, #write_timeout, #write_timeout=

Constructor Details

#initialize(options = {}) ⇒ WarKillmails

Returns a new instance of WarKillmails.



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

def initialize(options = {})
  super

  @war_id = options.fetch(:war_id)
  @page = options.fetch(:page, 1)
end

Instance Attribute Details

#pageObject (readonly)

Returns the value of attribute page.



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

def page
  @page
end

#war_idObject (readonly)

Returns the value of attribute war_id.



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

def war_id
  @war_id
end

Instance Method Details

#additional_query_paramsObject



31
32
33
# File 'lib/eve_online/esi/war_killmails.rb', line 31

def additional_query_params
  [:page]
end

#killmailsObject



17
18
19
20
21
22
23
24
25
26
# File 'lib/eve_online/esi/war_killmails.rb', line 17

def killmails
  @killmails ||=
    begin
      output = []
      response.each do |killmail|
        output << Models::KillmailShort.new(killmail)
      end
      output
    end
end

#pathObject



35
36
37
# File 'lib/eve_online/esi/war_killmails.rb', line 35

def path
  format(API_PATH, war_id: war_id)
end

#scopeObject



28
29
# File 'lib/eve_online/esi/war_killmails.rb', line 28

def scope
end