Sha256: 469bf9ef25a4019e7a72dc877231075fe8bb261e87322ef519523be808da1fbc

Contents?: true

Size: 738 Bytes

Versions: 13

Compression:

Stored size: 738 Bytes

Contents

# frozen_string_literal: true

require "forwardable"

module EveOnline
  module ESI
    class Character < Base
      extend Forwardable

      API_PATH = "/v4/characters/%<character_id>s/"

      attr_reader :character_id

      def initialize(options)
        super

        @character_id = options.fetch(:character_id)
      end

      def_delegators :model, :as_json, :alliance_id, :ancestry_id, :birthday,
        :bloodline_id, :corporation_id, :description, :faction_id, :gender,
        :name, :race_id, :security_status, :title

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

      def scope
      end

      def path
        format(API_PATH, character_id: character_id)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
eve_online-0.41.0 lib/eve_online/esi/character.rb
eve_online-0.40.0 lib/eve_online/esi/character.rb
eve_online-0.39.0 lib/eve_online/esi/character.rb
eve_online-0.38.0 lib/eve_online/esi/character.rb
eve_online-0.37.0 lib/eve_online/esi/character.rb
eve_online-0.36.0 lib/eve_online/esi/character.rb
eve_online-0.35.1 lib/eve_online/esi/character.rb
eve_online-0.35.0 lib/eve_online/esi/character.rb
eve_online-0.34.0 lib/eve_online/esi/character.rb
eve_online-0.33.0 lib/eve_online/esi/character.rb
eve_online-0.32.0 lib/eve_online/esi/character.rb
eve_online-0.31.0 lib/eve_online/esi/character.rb
eve_online-0.30.0 lib/eve_online/esi/character.rb