Sha256: ed196df928e88173e5ed5ea3897c27e4e6069ccf3de71d366186251a44566a26

Contents?: true

Size: 735 Bytes

Versions: 2

Compression:

Stored size: 735 Bytes

Contents

module EveOnline
  module Characters
    # https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/character/char_contactlist.html
    class ContactList < BaseXML
      API_ENDPOINT = 'https://api.eveonline.com/char/ContactList.xml.aspx'.freeze

      ACCESS_MASK = 16

      attr_reader :key_id, :v_code, :character_id

      def initialize(key_id, v_code, options = {})
        super()
        @key_id = key_id
        @v_code = v_code
        @character_id = options.fetch(:character_id, nil)
      end

      def url
        output = "#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }"
        output = "#{ output }&characterID=#{ character_id }" if character_id
        output
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eve_online-0.11.0 lib/eve_online/characters/contact_list.rb
eve_online-0.10.0 lib/eve_online/characters/contact_list.rb