Class: EveOnline::ESI::Resources::CorporationsResources

Inherits:
Resource
  • Object
show all
Defined in:
lib/eve_online/esi/resources/corporations_resources.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#default_headers, #get_request, #initialize, #post_request, #user_agent

Constructor Details

This class inherits a constructor from EveOnline::ESI::Resources::Resource

Instance Method Details

#npcObject



14
15
16
17
18
# File 'lib/eve_online/esi/resources/corporations_resources.rb', line 14

def npc
  response = get_request("corporations/npccorps")

  Models::NpcCorporations.new(body: response.body, headers: response.headers)
end

#retrieve(id:) ⇒ Object

Parameters:

  • id (Integer)

    The ID of the corporation



8
9
10
11
12
# File 'lib/eve_online/esi/resources/corporations_resources.rb', line 8

def retrieve(id:)
  response = get_request("corporations/#{id}")

  Models::Corporation.new(attributes: response.body, headers: response.headers)
end