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 array|null |
||
29 | */ |
||
30 | 1 | public function getConverseNextStep($sessionId, $text, Context $context = null) |
|
42 | |||
43 | /** |
||
44 | * @param string $text |
||
45 | * @param Context|null $context |
||
46 | * @param array $extraParams |
||
47 | * |
||
48 | * @return array|null |
||
49 | */ |
||
50 | 2 | public function getIntentByText($text, Context $context = null, array $extraParams = []) |
|
64 | |||
65 | /** |
||
66 | * @param string|resource $file |
||
67 | * @param array|null $context |
||
68 | * @param array $queryParams |
||
69 | * |
||
70 | * @return array|null |
||
71 | */ |
||
72 | 3 | public function getIntentBySpeech($file, Context $context = null, array $queryParams = []) |
|
88 | |||
89 | /** |
||
90 | * @param string $messageId |
||
91 | * |
||
92 | * @return array|null |
||
93 | */ |
||
94 | 1 | public function getMessage($messageId) |
|
100 | |||
101 | /** |
||
102 | * @param ResponseInterface $response |
||
103 | * |
||
104 | * @return array|null |
||
105 | */ |
||
106 | 6 | protected function decodeResponse(ResponseInterface $response) |
|
110 | } |
||
111 |