Skip to content

class Tourmaline::Contact
inherits Reference #

This object represents a phone contact.

Included modules

JSON::Serializable

Constructors#

.new(phone_number, first_name, last_name : String? = nil, user_id : Int32 | Int64 | Nil = nil, vcard : String? = nil) #

View source

.new(pull : JSON::PullParser) #

View source

Methods#

#first_name : String #

Contact's first name

View source

#first_name=(first_name : String) #

Contact's first name

View source

#last_name : String? #

Optional. Contact's last name

View source

#last_name=(last_name : String?) #

Optional. Contact's last name

View source

#phone_number : String #

Contact's phone number

View source

#phone_number=(phone_number : String) #

Contact's phone number

View source

#user_id : Int32 | Int64 | Nil #

Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.

View source

#user_id=(user_id : Int32 | Int64 | Nil) #

Optional. Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.

View source

#vcard : String? #

Optional. Additional data about the contact in the form of a vCard

View source

#vcard=(vcard : String?) #

Optional. Additional data about the contact in the form of a vCard

View source