Class: TD::Types::Session

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/session.rb

Overview

Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#api_idInteger

Telegram API identifier, as provided by the application.

Returns:

  • (Integer)

    the current value of api_id



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def api_id
  @api_id
end

#application_nameString

Name of the application, as provided by the application.

Returns:

  • (String)

    the current value of application_name



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def application_name
  @application_name
end

#application_versionString

The version of the application, as provided by the application.

Returns:

  • (String)

    the current value of application_version



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def application_version
  @application_version
end

#countryString

A two-letter country code for the country from which the session was created, based on the IP address.

Returns:

  • (String)

    the current value of country



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def country
  @country
end

#device_modelString

Model of the device the application has been run or is running on, as provided by the application.

Returns:

  • (String)

    the current value of device_model



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def device_model
  @device_model
end

#idInteger

Session identifier.

Returns:

  • (Integer)

    the current value of id



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def id
  @id
end

#ipString

IP address from which the session was created, in human-readable format.

Returns:

  • (String)

    the current value of ip



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def ip
  @ip
end

#is_currentBoolean

True, if this session is the current session.

Returns:

  • (Boolean)

    the current value of is_current



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def is_current
  @is_current
end

#is_official_applicationBoolean

True, if the application is an official application or uses the api_id of an official application.

Returns:

  • (Boolean)

    the current value of is_official_application



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def is_official_application
  @is_official_application
end

#is_password_pendingBoolean

True, if a password is needed to complete authorization of the session.

Returns:

  • (Boolean)

    the current value of is_password_pending



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def is_password_pending
  @is_password_pending
end

#last_active_dateInteger

Point in time (Unix timestamp) when the session was last used.

Returns:

  • (Integer)

    the current value of last_active_date



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def last_active_date
  @last_active_date
end

#log_in_dateInteger

Point in time (Unix timestamp) when the user has logged in.

Returns:

  • (Integer)

    the current value of log_in_date



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def 
  @log_in_date
end

#platformString

Operating system the application has been run or is running on, as provided by the application.

Returns:

  • (String)

    the current value of platform



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def platform
  @platform
end

#regionString

Region code from which the session was created, based on the IP address.

Returns:

  • (String)

    the current value of region



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def region
  @region
end

#system_versionString

Version of the operating system the application has been run or is running on, as provided by the application.

Returns:

  • (String)

    the current value of system_version



25
26
27
# File 'lib/tdlib/types/session.rb', line 25

def system_version
  @system_version
end