Sha256: 4588a2183f700dd17577ced26d2339aeeddf38d77ea05c6346b4fa9d4210682d

Contents?: true

Size: 1.38 KB

Versions: 6

Compression:

Stored size: 1.38 KB

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    module Models
      class Search < Base
        def as_json
          {
            agent_ids: agent_ids,
            alliance_ids: alliance_ids,
            character_ids: character_ids,
            constellation_ids: constellation_ids,
            corporation_ids: corporation_ids,
            faction_ids: faction_ids,
            inventory_type_ids: inventory_type_ids,
            region_ids: region_ids,
            solar_system_ids: solar_system_ids,
            station_ids: station_ids
          }
        end

        def agent_ids
          options.fetch("agent", [])
        end

        def alliance_ids
          options.fetch("alliance", [])
        end

        def character_ids
          options.fetch("character", [])
        end

        def constellation_ids
          options.fetch("constellation", [])
        end

        def corporation_ids
          options.fetch("corporation", [])
        end

        def faction_ids
          options.fetch("faction", [])
        end

        def inventory_type_ids
          options.fetch("inventory_type", [])
        end

        def region_ids
          options.fetch("region", [])
        end

        def solar_system_ids
          options.fetch("solar_system", [])
        end

        def station_ids
          options.fetch("stations", [])
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
eve_online-0.46.0 lib/eve_online/esi/models/search.rb
eve_online-0.45.0 lib/eve_online/esi/models/search.rb
eve_online-0.44.0 lib/eve_online/esi/models/search.rb
eve_online-0.43.0 lib/eve_online/esi/models/search.rb
eve_online-0.42.0 lib/eve_online/esi/models/search.rb
eve_online-0.41.0 lib/eve_online/esi/models/search.rb