Class: EveOnline::ESI::Resources::AlliancesResources

Inherits:
Resource
  • Object
show all
Defined in:
lib/eve_online/esi/resources/alliances_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

#corporations(id:) ⇒ Object

Parameters:

  • id (Integer)

    The ID of the alliance



21
22
23
24
25
# File 'lib/eve_online/esi/resources/alliances_resources.rb', line 21

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

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

#icons(id:) ⇒ Object

Parameters:

  • id (Integer)

    The ID of the alliance



28
29
30
31
32
# File 'lib/eve_online/esi/resources/alliances_resources.rb', line 28

def icons(id:)
  response = get_request("alliances/#{id}/icons")

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

#listObject



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

def list
  response = get_request("alliances")

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

#retrieve(id:) ⇒ Object

Parameters:

  • id (Integer)

    The ID of the alliance



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

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

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