1 | <?php |
||
8 | class Api |
||
9 | { |
||
10 | /** |
||
11 | * @var Client client |
||
12 | */ |
||
13 | private $client; |
||
14 | |||
15 | /** |
||
16 | * @param Client $client |
||
17 | */ |
||
18 | 8 | public function __construct(Client $client) |
|
22 | |||
23 | /** |
||
24 | * @param string $sessionId |
||
25 | * @param string $text |
||
26 | * @param Context|null $context |
||
27 | * |
||
28 | * @return ResponseInterface |
||
29 | */ |
||
30 | 1 | public function getConverseNextStep($sessionId, $text, Context $context = null) |
|
39 | |||
40 | /** |
||
41 | * @param string $text |
||
42 | * @param Context|null $context |
||
43 | * @param array $extraParams |
||
44 | * |
||
45 | * @return ResponseInterface |
||
46 | */ |
||
47 | 2 | public function getIntentByText($text, Context $context = null, array $extraParams = []) |
|
59 | |||
60 | /** |
||
61 | * @param string|resource $file |
||
62 | * @param array|null $context |
||
63 | * @param array $extraParams |
||
64 | * |
||
65 | * @return ResponseInterface |
||
66 | */ |
||
67 | 3 | public function getIntentBySpeech($file, Context $context = null, array $extraParams = []) |
|
81 | |||
82 | /** |
||
83 | * @param string $messageId |
||
84 | * |
||
85 | * @return ResponseInterface |
||
86 | */ |
||
87 | 1 | public function getMessage($messageId) |
|
91 | } |
||
92 |