Class: TD::Types::Session
- Defined in:
- lib/tdlib/types/session.rb
Overview
Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.
Instance Attribute Summary collapse
-
#api_id ⇒ Integer
Telegram API identifier, as provided by the application.
-
#application_name ⇒ TD::Types::String
Name of the application, as provided by the application.
-
#application_version ⇒ TD::Types::String
The version of the application, as provided by the application.
-
#can_accept_calls ⇒ Boolean
True, if incoming calls can be accepted by the session.
-
#can_accept_secret_chats ⇒ Boolean
True, if incoming secret chats can be accepted by the session.
-
#device_model ⇒ TD::Types::String
Model of the device the application has been run or is running on, as provided by the application.
-
#id ⇒ Integer
Session identifier.
-
#ip_address ⇒ TD::Types::String
IP address from which the session was created, in human-readable format.
-
#is_current ⇒ Boolean
True, if this session is the current session.
-
#is_official_application ⇒ Boolean
True, if the application is an official application or uses the api_id of an official application.
-
#is_password_pending ⇒ Boolean
True, if a 2-step verification password is needed to complete authorization of the session.
-
#is_unconfirmed ⇒ Boolean
True, if the session wasn’t confirmed from another session.
-
#last_active_date ⇒ Integer
Point in time (Unix timestamp) when the session was last used.
-
#location ⇒ TD::Types::String
A human-readable description of the location from which the session was created, based on the IP address.
-
#log_in_date ⇒ Integer
Point in time (Unix timestamp) when the user has logged in.
-
#platform ⇒ TD::Types::String
Operating system the application has been run or is running on, as provided by the application.
-
#system_version ⇒ TD::Types::String
Version of the operating system the application has been run or is running on, as provided by the application.
-
#type ⇒ TD::Types::SessionType
Session type based on the system and application version, which can be used to display a corresponding icon.
Method Summary
Methods inherited from Base
Instance Attribute Details
#api_id ⇒ Integer
Telegram API identifier, as provided by the application.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def api_id @api_id end |
#application_name ⇒ TD::Types::String
Name of the application, as provided by the application.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def application_name @application_name end |
#application_version ⇒ TD::Types::String
The version of the application, as provided by the application.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def application_version @application_version end |
#can_accept_calls ⇒ Boolean
True, if incoming calls can be accepted by the session.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def can_accept_calls @can_accept_calls end |
#can_accept_secret_chats ⇒ Boolean
True, if incoming secret chats can be accepted by the session.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def can_accept_secret_chats @can_accept_secret_chats end |
#device_model ⇒ TD::Types::String
Model of the device the application has been run or is running on, as provided by the application.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def device_model @device_model end |
#id ⇒ Integer
Session identifier.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def id @id end |
#ip_address ⇒ TD::Types::String
IP address from which the session was created, in human-readable format.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def ip_address @ip_address end |
#is_current ⇒ Boolean
True, if this session is the current session.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def is_current @is_current end |
#is_official_application ⇒ Boolean
True, if the application is an official application or uses the api_id of an official application.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def is_official_application @is_official_application end |
#is_password_pending ⇒ Boolean
True, if a 2-step verification password is needed to complete authorization of the session.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def is_password_pending @is_password_pending end |
#is_unconfirmed ⇒ Boolean
True, if the session wasn’t confirmed from another session.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def is_unconfirmed @is_unconfirmed end |
#last_active_date ⇒ Integer
Point in time (Unix timestamp) when the session was last used.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def last_active_date @last_active_date end |
#location ⇒ TD::Types::String
A human-readable description of the location from which the session was created, based on the IP address.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def location @location end |
#log_in_date ⇒ Integer
Point in time (Unix timestamp) when the user has logged in.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def log_in_date @log_in_date end |
#platform ⇒ TD::Types::String
Operating system the application has been run or is running on, as provided by the application.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def platform @platform end |
#system_version ⇒ TD::Types::String
Version of the operating system the application has been run or is running on, as provided by the application.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def system_version @system_version end |
#type ⇒ TD::Types::SessionType
Session type based on the system and application version, which can be used to display a corresponding icon.
30 31 32 |
# File 'lib/tdlib/types/session.rb', line 30 def type @type end |