Class: EveOnline::ESI::Resources::SearchResources

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

#search(id:, categories: [], search: nil, strict: false) ⇒ Object

Parameters:

  • id (Integer)

    A character ID

  • categories (Array<String>) (defaults to: [])

    Type of entities to search for. Any: "agent", "alliance", "character", "constellation", "corporation", "faction", "inventory_type", "region", "solar_system", "station", "structure". Default: []

  • search (String) (defaults to: nil)

    The string to search on. Default: nil

  • strict (Boolean) (defaults to: false)

    Whether the search should be a strict match. Default: false



14
15
16
17
18
19
20
21
22
23
# File 'lib/eve_online/esi/resources/search_resources.rb', line 14

def search(id:, categories: [], search: nil, strict: false)
  response = get_request("characters/#{id}/search",
    params: {
      categories: categories.join(","),
      search: search,
      strict: strict
    })

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