1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the TelegramBot package. |
5
|
|
|
* |
6
|
|
|
* (c) Avtandil Kikabidze aka LONGMAN <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Longman\TelegramBot\Entities\InlineQuery; |
13
|
|
|
|
14
|
|
|
use Longman\TelegramBot\Entities\InlineKeyboard; |
15
|
|
|
use Longman\TelegramBot\Entities\InputMessageContent\InputMessageContent; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* Class InlineQueryResultLocation |
19
|
|
|
* |
20
|
|
|
* @link https://core.telegram.org/bots/api#inlinequeryresultlocation |
21
|
|
|
* |
22
|
|
|
* <code> |
23
|
|
|
* $data = [ |
24
|
|
|
* 'id' => '', |
25
|
|
|
* 'latitude' => 36.0338, |
26
|
|
|
* 'longitude' => 71.8601, |
27
|
|
|
* 'title' => '', |
28
|
|
|
* 'horizontal_accuracy' => 36.9, |
29
|
|
|
* 'live_period' => 900, |
30
|
|
|
* 'heading' => 88, |
31
|
|
|
* 'proximity_alert_radius' => 300, |
32
|
|
|
* 'reply_markup' => <InlineKeyboard>, |
33
|
|
|
* 'input_message_content' => <InputMessageContent>, |
34
|
|
|
* 'thumb_url' => '', |
35
|
|
|
* 'thumb_width' => 30, |
36
|
|
|
* 'thumb_height' => 30, |
37
|
|
|
* ]; |
38
|
|
|
* </code> |
39
|
|
|
* |
40
|
|
|
* @method string getType() Type of the result, must be location |
41
|
|
|
* @method string getId() Unique identifier for this result, 1-64 Bytes |
42
|
|
|
* @method float getLatitude() Location latitude in degrees |
43
|
|
|
* @method float getLongitude() Location longitude in degrees |
44
|
|
|
* @method string getTitle() Location title |
45
|
|
|
* @method float getHorizontalAccuracy() Optional. The radius of uncertainty for the location, measured in meters; 0-1500 |
46
|
|
|
* @method int getLivePeriod() Optional. Period in seconds for which the location can be updated, should be between 60 and 86400. |
47
|
|
|
* @method int getHeading() Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. |
48
|
|
|
* @method int getProximityAlertRadius() Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. |
49
|
|
|
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message |
50
|
|
|
* @method InputMessageContent getInputMessageContent() Optional. Content of the message to be sent instead of the location |
51
|
|
|
* @method string getThumbUrl() Optional. Url of the thumbnail for the result |
52
|
|
|
* @method int getThumbWidth() Optional. Thumbnail width |
53
|
|
|
* @method int getThumbHeight() Optional. Thumbnail height |
54
|
|
|
* |
55
|
|
|
* @method $this setId(string $id) Unique identifier for this result, 1-64 Bytes |
56
|
|
|
* @method $this setLatitude(float $latitude) Location latitude in degrees |
57
|
|
|
* @method $this setLongitude(float $longitude) Location longitude in degrees |
58
|
|
|
* @method $this setTitle(string $title) Location title |
59
|
|
|
* @method $this setHorizontalAccuracy(float $horizontal_accuracy) Optional. The radius of uncertainty for the location, measured in meters; 0-1500 |
60
|
|
|
* @method $this setLivePeriod(int $live_period) Optional. Period in seconds for which the location can be updated, should be between 60 and 86400. |
61
|
|
|
* @method $this setHeading(int $heading) Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. |
62
|
|
|
* @method $this setProximityAlertRadius(int $proximity_alert_radius) Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. |
63
|
|
|
* @method $this setReplyMarkup(InlineKeyboard $reply_markup) Optional. Inline keyboard attached to the message |
64
|
|
|
* @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the location |
65
|
|
|
* @method $this setThumbUrl(string $thumb_url) Optional. Url of the thumbnail for the result |
66
|
|
|
* @method $this setThumbWidth(int $thumb_width) Optional. Thumbnail width |
67
|
|
|
* @method $this setThumbHeight(int $thumb_height) Optional. Thumbnail height |
68
|
|
|
*/ |
69
|
|
|
class InlineQueryResultLocation extends InlineEntity implements InlineQueryResult |
70
|
|
|
{ |
71
|
|
|
/** |
72
|
|
|
* InlineQueryResultLocation constructor |
73
|
|
|
* |
74
|
|
|
* @param array $data |
75
|
|
|
*/ |
76
|
|
|
public function __construct(array $data = []) |
77
|
|
|
{ |
78
|
|
|
$data['type'] = 'location'; |
79
|
|
|
parent::__construct($data); |
80
|
|
|
} |
81
|
|
|
} |
82
|
|
|
|