Sha256: 1ceb15583c95ab792f05bb60ac8f779bcd60cbd0ae482b825a640250ac4e2e10
Contents?: true
Size: 681 Bytes
Versions: 12
Compression:
Stored size: 681 Bytes
Contents
module Rockstar class Auth < Base # Returns the token for a session. You have to use # TokenAuth first and then use this class with the token # that is given by last.fm to create a session token # This session token can be stored in your database, it is # not expiring. # See Rockstar::TokenAuth for a detailed example def session(token) doc = self.class.fetch_and_parse("auth.getSession", {:token => token}, true) Rockstar::Session.new_from_xml(doc) end def token doc = self.class.fetch_and_parse("auth.getToken", {}, true) token = (doc).at(:token).inner_html if (doc).at(:token) token end end end
Version data entries
12 entries across 12 versions & 2 rubygems