Sha256: 7bada5ecc8aad4e93c4a9791c5bd47f76fa83d4d628a42ec12dd43e1131a437e

Contents?: true

Size: 775 Bytes

Versions: 4

Compression:

Stored size: 775 Bytes

Contents

# frozen_string_literal: true

module EveOnline
  module ESI
    class CharacterStandings < Base
      API_PATH = '/v1/characters/%<character_id>s/standings/?datasource=%<datasource>s'

      attr_reader :character_id

      def initialize(options)
        super

        @character_id = options.fetch(:character_id)
      end

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

      def scope
        'esi-characters.read_standings.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_standings.rb
eve_online-0.26.0 lib/eve_online/esi/character_standings.rb
eve_online-0.25.0 lib/eve_online/esi/character_standings.rb
eve_online-0.24.0 lib/eve_online/esi/character_standings.rb