lib/hallon/observable/session.rb in hallon-0.14.0 vs lib/hallon/observable/session.rb in hallon-0.15.0
- old
+ new
@@ -234,7 +234,20 @@
# @yieldparam [Symbol] error
# @yieldparam [Session] self
def offline_error_callback(pointer, error)
trigger(pointer, :offline_error, error)
end
+
+
+ # @example listening to this event
+ # session.on(:credentials_blob_updated) do |credentials|
+ # File.open('.spotify-credentials', 'w') { |io| io.write(credentials) }
+ # end
+ #
+ # @yield [credentials, self]
+ # @yieldparam [String] credentials
+ # @yieldparam [Session] self
+ def credentials_blob_updated_callback(pointer, credentials)
+ trigger(pointer, :credentials_blob_updated, credentials)
+ end
end
end