Sha256: bcb6d8cfe83fe449b6b5d61a401ba9f5d872c65dda4a301542b93473ed43219e

Contents?: true

Size: 724 Bytes

Versions: 5

Compression:

Stored size: 724 Bytes

Contents

# frozen_string_literal: true

require "forwardable"

module EveOnline
  module ESI
    class Character < Base
      extend Forwardable

      API_PATH = "/v5/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, :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

5 entries across 5 versions & 1 rubygems

Version Path
eve_online-0.46.0 lib/eve_online/esi/character.rb
eve_online-0.45.0 lib/eve_online/esi/character.rb
eve_online-0.44.0 lib/eve_online/esi/character.rb
eve_online-0.43.0 lib/eve_online/esi/character.rb
eve_online-0.42.0 lib/eve_online/esi/character.rb