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