Module: Lich::API
- Defined in:
- documented/api/active_sessions.rb
Class Method Summary collapse
-
.active_session_service_info ⇒ Hash
private
Provides information about the active session service availability.
-
.active_session_snapshot ⇒ Hash
private
Returns a snapshot of the active sessions.
-
.active_sessions ⇒ Array<Hash>
private
Retrieves the list of active sessions.
Class Method Details
.active_session_service_info ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Provides information about the active session service availability.
32 33 34 35 36 37 38 39 |
# File 'documented/api/active_sessions.rb', line 32 def self.active_session_service_info return { source: 'ActiveSessionsAPI', service_available: false } unless defined?(Lich::InternalAPI::ActiveSessions) Lich::InternalAPI::ActiveSessions.service_info end |
.active_session_snapshot ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a snapshot of the active sessions.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'documented/api/active_sessions.rb', line 8 def self.active_session_snapshot return { source: 'ActiveSessionsAPI', total: 0, connected: 0, detachable: 0, sessions: [] } unless defined?(Lich::InternalAPI::ActiveSessions) Lich::InternalAPI::ActiveSessions.snapshot end |
.active_sessions ⇒ Array<Hash>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Retrieves the list of active sessions.
24 25 26 |
# File 'documented/api/active_sessions.rb', line 24 def self.active_sessions active_session_snapshot[:sessions] || [] end |