Sha256: f1b5b249858775696f98882595c5e146d906e26b106e3ec0f0a7d6e0c5ca4bfd

Contents?: true

Size: 681 Bytes

Versions: 1

Compression:

Stored size: 681 Bytes

Contents

module EveOnline
  module ESI
    class CharacterStandings < Base
      API_ENDPOINT = 'https://esi.tech.ccp.is/v1/characters/%<character_id>s/standings/?datasource=tranquility'.freeze

      attr_reader :character_id

      def initialize(options)
        super

        @character_id = options[:character_id]
      end

      def standings
        output = []
        response.each do |standing|
          output << Models::Standing.new(standing)
        end
        output
      end
      memoize :standings

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

      def url
        format(API_ENDPOINT, character_id: character_id)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eve_online-0.14.0 lib/eve_online/esi/character_standings.rb