1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* This file is part of the TelegramBot package. |
4
|
|
|
* |
5
|
|
|
* (c) Avtandil Kikabidze aka LONGMAN <[email protected]> |
6
|
|
|
* |
7
|
|
|
* For the full copyright and license information, please view the LICENSE |
8
|
|
|
* file that was distributed with this source code. |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Longman\TelegramBot\Entities\InlineQuery; |
12
|
|
|
|
13
|
|
|
use Longman\TelegramBot\Entities\InlineKeyboard; |
14
|
|
|
use Longman\TelegramBot\Entities\InputMessageContent\InputMessageContent; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Class InlineQueryResultAudio |
18
|
|
|
* |
19
|
|
|
* @link https://core.telegram.org/bots/api#inlinequeryresultaudio |
20
|
|
|
* |
21
|
|
|
* <code> |
22
|
|
|
* $data = [ |
23
|
|
|
* 'id' => '', |
24
|
|
|
* 'audio_url' => '', |
25
|
|
|
* 'title' => '', |
26
|
|
|
* 'caption' => '', |
27
|
|
|
* 'performer' => '', |
28
|
|
|
* 'audio_duration' => 123, |
29
|
|
|
* 'reply_markup' => <InlineKeyboard>, |
30
|
|
|
* 'input_message_content' => <InputMessageContent>, |
31
|
|
|
* ]; |
32
|
|
|
* </code> |
33
|
|
|
* |
34
|
|
|
* @method string getType() Type of the result, must be audio |
35
|
|
|
* @method string getId() Unique identifier for this result, 1-64 bytes |
36
|
|
|
* @method string getAudioUrl() A valid URL for the audio file |
37
|
|
|
* @method string getTitle() Title |
38
|
|
|
* @method string getCaption() Optional. Caption, 0-200 characters |
39
|
|
|
* @method string getPerformer() Optional. Performer |
40
|
|
|
* @method int getAudioDuration() Optional. Audio duration in seconds |
41
|
|
|
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message |
42
|
|
|
* @method InputMessageContent getInputMessageContent() Optional. Content of the message to be sent instead of the audio |
43
|
|
|
* |
44
|
|
|
* @method $this setId(string $id) Unique identifier for this result, 1-64 bytes |
45
|
|
|
* @method $this setAudioUrl(string $audio_url) A valid URL for the audio file |
46
|
|
|
* @method $this setTitle(string $title) Title |
47
|
|
|
* @method $this setCaption(string $caption) Optional. Caption, 0-200 characters |
48
|
|
|
* @method $this setPerformer(string $performer) Optional. Performer |
49
|
|
|
* @method $this setAudioDuration(int $audio_duration) Optional. Audio duration in seconds |
50
|
|
|
* @method $this setReplyMarkup(InlineKeyboard $reply_markup) Optional. Inline keyboard attached to the message |
51
|
|
|
* @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the audio |
52
|
|
|
*/ |
53
|
|
|
class InlineQueryResultAudio extends InlineEntity |
54
|
|
|
{ |
55
|
|
|
/** |
56
|
|
|
* InlineQueryResultAudio constructor |
57
|
|
|
* |
58
|
|
|
* @param array $data |
59
|
|
|
* |
60
|
|
|
* @throws \Longman\TelegramBot\Exception\TelegramException |
61
|
|
|
*/ |
62
|
|
|
public function __construct(array $data = []) |
63
|
|
|
{ |
64
|
|
|
$data['type'] = 'audio'; |
65
|
|
|
parent::__construct($data); |
66
|
|
|
} |
67
|
|
|
} |
68
|
|
|
|