Sha256: e3d22f54bbebbf2388051067b88c2e84daaa18c1aba5e5b64a0b4bbe93f22425
Contents?: true
Size: 1.24 KB
Versions: 3
Compression:
Stored size: 1.24 KB
Contents
module EveOnline module XML # https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/character/char_bookmarks.html class CharacterBookmarks < Base API_ENDPOINT = 'https://api.eveonline.com/char/Bookmarks.xml.aspx'.freeze ACCESS_MASK = 268_435_456 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 bookmark_folders case row when Hash [BookmarkFolder.new(row)] when Array output = [] row.each do |bookmark_folder| output << BookmarkFolder.new(bookmark_folder) end output else raise ArgumentError end end memoize :bookmark_folders def url output = "#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }" output = "#{ output }&characterID=#{ character_id }" if character_id output end private def rowset result.fetch('rowset') end memoize :rowset def row rowset.fetch('row') end memoize :row end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
eve_online-0.14.0 | lib/eve_online/xml/character_bookmarks.rb |
eve_online-0.13.0 | lib/eve_online/xml/character_bookmarks.rb |
eve_online-0.12.0 | lib/eve_online/xml/character_bookmarks.rb |