Sha256: 43c9c6ab2eeae580092af9c9fd5f4e76efe47ecc76fab1f4557c2edf98928284

Contents?: true

Size: 1004 Bytes

Versions: 1

Compression:

Stored size: 1004 Bytes

Contents

require_relative "../base_item"

module Greeve
  module Character
    # Character research.
    #
    # @see https://eveonline-third-party-documentation.readthedocs.io/en/latest/xmlapi/character/char_research.html
    class Research < Greeve::BaseItem
      endpoint "char/Research"

      rowset :research, xpath: "eveapi/result/rowset[@name='research']" do
        attribute :agent_id,            xpath: "@agentID",           type: :integer
        attribute :skill_type_id,       xpath: "@skillTypeID",       type: :integer
        attribute :research_start_date, xpath: "@researchStartDate", type: :datetime
        attribute :points_per_day,      xpath: "@pointsPerDay",      type: :numeric
        attribute :remainder_points,    xpath: "@remainderPoints",   type: :numeric
      end

      # @param character_id [Integer] EVE character ID
      def initialize(character_id, opts = {})
        opts[:query_params] = { "characterID" => character_id }
        super(opts)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
greeve-1.0.0 lib/greeve/character/research.rb