Sha256: da0634166d045752939d35d209c1ddfd438131afcf0c3883fcf7333175f965b8
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
module EveOnline module Characters # https://eveonline-third-party-documentation.readthedocs.org/en/latest/xmlapi/character/char_bookmarks.html class Bookmarks < BaseXML 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, character_id) super() @key_id = key_id @v_code = v_code @character_id = character_id 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 "#{ API_ENDPOINT }?keyID=#{ key_id }&vCode=#{ v_code }&characterID=#{ character_id }" end private def rowset result.fetch('rowset') end memoize :rowset def row rowset.fetch('row') end memoize :row end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eve_online-0.9.0 | lib/eve_online/characters/bookmarks.rb |