Sha256: a7c787d2dd06402afc00497a72d1767d778f06e10e1b6ad591930c8ee7989972

Contents?: true

Size: 766 Bytes

Versions: 2

Compression:

Stored size: 766 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

2 entries across 2 versions & 1 rubygems

Version Path
eve_online-0.29.0 lib/eve_online/esi/character.rb
eve_online-0.28.0 lib/eve_online/esi/character.rb