1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace TelegramBot\Entities\InlineQuery; |
4
|
|
|
|
5
|
|
|
use TelegramBot\Entities\InlineKeyboard; |
6
|
|
|
use TelegramBot\Entities\InputMessageContent\InputMessageContent; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class InlineQueryResultContact |
10
|
|
|
* |
11
|
|
|
* @link https://core.telegram.org/bots/api#inlinequeryresultcontact |
12
|
|
|
* |
13
|
|
|
* <code> |
14
|
|
|
* $data = [ |
15
|
|
|
* 'id' => '', |
16
|
|
|
* 'phone_number' => '', |
17
|
|
|
* 'first_name' => '', |
18
|
|
|
* 'last_name' => '', |
19
|
|
|
* 'reply_markup' => <InlineKeyboard>, |
20
|
|
|
* 'input_message_content' => <InputMessageContent>, |
21
|
|
|
* 'thumb_url' => '', |
22
|
|
|
* 'thumb_width' => 30, |
23
|
|
|
* 'thumb_height' => 30, |
24
|
|
|
* ]; |
25
|
|
|
* </code> |
26
|
|
|
* |
27
|
|
|
* @method string getType() Type of the result, must be contact |
28
|
|
|
* @method string getId() Unique identifier for this result, 1-64 Bytes |
29
|
|
|
* @method string getPhoneNumber() Contact's phone number |
30
|
|
|
* @method string getFirstName() Contact's first name |
31
|
|
|
* @method string getLastName() Optional. Contact's last name |
32
|
|
|
* @method string getVcard() Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes |
33
|
|
|
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message |
34
|
|
|
* @method InputMessageContent getInputMessageContent() Optional. Content of the message to be sent instead of the contact |
35
|
|
|
* @method string getThumbUrl() Optional. Url of the thumbnail for the result |
36
|
|
|
* @method int getThumbWidth() Optional. Thumbnail width |
37
|
|
|
* @method int getThumbHeight() Optional. Thumbnail height |
38
|
|
|
* |
39
|
|
|
* @method $this setId(string $id) Unique identifier for this result, 1-64 Bytes |
40
|
|
|
* @method $this setPhoneNumber(string $phone_number) Contact's phone number |
41
|
|
|
* @method $this setFirstName(string $first_name) Contact's first name |
42
|
|
|
* @method $this setLastName(string $last_name) Optional. Contact's last name |
43
|
|
|
* @method $this setVcard(string $vcard) Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes |
44
|
|
|
* @method $this setReplyMarkup(InlineKeyboard $reply_markup) Optional. Inline keyboard attached to the message |
45
|
|
|
* @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the contact |
46
|
|
|
* @method $this setThumbUrl(string $thumb_url) Optional. Url of the thumbnail for the result |
47
|
|
|
* @method $this setThumbWidth(int $thumb_width) Optional. Thumbnail width |
48
|
|
|
* @method $this setThumbHeight(int $thumb_height) Optional. Thumbnail height |
49
|
|
|
*/ |
50
|
|
|
class InlineQueryResultContact extends InlineEntity implements InlineQueryResult |
51
|
|
|
{ |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* InlineQueryResultContact constructor |
55
|
|
|
* |
56
|
|
|
* @param array $data |
57
|
|
|
*/ |
58
|
|
|
public function __construct(array $data = []) |
59
|
|
|
{ |
60
|
|
|
$data['type'] = 'contact'; |
61
|
|
|
parent::__construct($data); |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
} |
65
|
|
|
|