Sha256: d35953be7ca8c76dbf62492db55a35e13933cbfccdd938727aa3701291691d74

Contents?: true

Size: 779 Bytes

Versions: 4

Compression:

Stored size: 779 Bytes

Contents

# frozen_string_literal: true

require 'forwardable'

module EveOnline
  module ESI
    class CharacterFatigue < Base
      extend Forwardable

      API_PATH = '/v1/characters/%<character_id>s/fatigue/?datasource=%<datasource>s'

      attr_reader :character_id

      def initialize(options)
        super

        @character_id = options.fetch(:character_id)
      end

      def_delegators :model, :as_json, :jump_fatigue_expire_date,
                     :last_jump_date, :last_update_date

      def model
        @model ||= Models::Fatigue.new(response)
      end

      def scope
        'esi-characters.read_fatigue.v1'
      end

      def url
        format("#{ API_HOST }#{ API_PATH }", character_id: character_id, datasource: datasource)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
eve_online-0.27.0 lib/eve_online/esi/character_fatigue.rb
eve_online-0.26.0 lib/eve_online/esi/character_fatigue.rb
eve_online-0.25.0 lib/eve_online/esi/character_fatigue.rb
eve_online-0.24.0 lib/eve_online/esi/character_fatigue.rb