class EveOnline::ESI::Search

Constants

API_PATH
DEFAULT_CATEGORIES

Attributes

categories[R]
raw_categories[R]
strict[R]

Public Class Methods

new(options) click to toggle source
Calls superclass method EveOnline::ESI::Base::new
# File lib/eve_online/esi/search.rb, line 27
def initialize(options)
  super

  @search = options.fetch(:search)
  @strict = options.fetch(:strict, false)
  @raw_categories = options.fetch(:categories, DEFAULT_CATEGORIES)
  @raw_categories.each do |c|
    unless DEFAULT_CATEGORIES.include?(c)
      raise(ArgumentError)
    end
  end
  @categories = @raw_categories.join(",")
end

Public Instance Methods

additional_query_params() click to toggle source
# File lib/eve_online/esi/search.rb, line 52
def additional_query_params
  [:search, :categories, :strict]
end
model() click to toggle source
# File lib/eve_online/esi/search.rb, line 45
def model
  @model ||= Models::Search.new(response)
end
path() click to toggle source
# File lib/eve_online/esi/search.rb, line 56
def path
  format(API_PATH, search: search, categories: categories, strict: strict)
end
scope() click to toggle source
# File lib/eve_online/esi/search.rb, line 49
def scope
end