Class: TD::Types::User

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

Overview

Represents a user.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#first_nameString

First name of the user.

Returns:

  • (String)

    the current value of first_name



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def first_name
  @first_name
end

#have_accessBoolean

If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser.

Returns:

  • (Boolean)

    the current value of have_access



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def have_access
  @have_access
end

#idInteger

User identifier.

Returns:

  • (Integer)

    the current value of id



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def id
  @id
end

Relationship from the other user to the current user.

Returns:



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def incoming_link
  @incoming_link
end

#is_scamBoolean

True, if many users reported this user as a scam.

Returns:

  • (Boolean)

    the current value of is_scam



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def is_scam
  @is_scam
end

#is_supportBoolean

True, if the user is Telegram support account.

Returns:

  • (Boolean)

    the current value of is_support



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def is_support
  @is_support
end

#is_verifiedBoolean

True, if the user is verified.

Returns:

  • (Boolean)

    the current value of is_verified



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def is_verified
  @is_verified
end

#language_codeString

IETF language tag of the user's language; only available to bots.

Returns:

  • (String)

    the current value of language_code



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def language_code
  @language_code
end

#last_nameString

Last name of the user.

Returns:

  • (String)

    the current value of last_name



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def last_name
  @last_name
end

Relationship from the current user to the other user.

Returns:



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def outgoing_link
  @outgoing_link
end

#phone_numberString

Phone number of the user.

Returns:

  • (String)

    the current value of phone_number



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def phone_number
  @phone_number
end

#profile_photoTD::Types::ProfilePhoto?

Profile photo of the user; may be null.

Returns:



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def profile_photo
  @profile_photo
end

#restriction_reasonString

If non-empty, it contains the reason why access to this user must be restricted. The format of the string is "#type: description". #type contains the type of the restriction and at least one of the suffixes "-all", "-ios", "-android", or "-wp", which describe the platforms on which access should be restricted. (For example, "terms-ios-android". description contains a human-readable description of the restriction, which can be shown to the user).

Returns:

  • (String)

    the current value of restriction_reason



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def restriction_reason
  @restriction_reason
end

#statusTD::Types::UserStatus

Current online status of the user.

Returns:



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def status
  @status
end

#typeTD::Types::UserType

Type of the user.

Returns:



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def type
  @type
end

#usernameString

Username of the user.

Returns:

  • (String)

    the current value of username



27
28
29
# File 'lib/tdlib/types/user.rb', line 27

def username
  @username
end