| @@ 595-613 (lines=19) @@ | ||
| 592 | * @throws InvalidParameterException |
|
| 593 | * @throws NotFoundException |
|
| 594 | */ |
|
| 595 | public function startSnoop($channelId, $spy, $whisper, $app, $appArgs, $snoopId) |
|
| 596 | { |
|
| 597 | $uri = "channels/$channelId/snoop"; |
|
| 598 | try { |
|
| 599 | $response = $this->client->getEndpoint()->post($uri, [ |
|
| 600 | 'form_params' => [ |
|
| 601 | 'spy' => $spy, |
|
| 602 | 'whisper' => $whisper, |
|
| 603 | 'app' => $app, |
|
| 604 | 'appArgs' => $appArgs, |
|
| 605 | 'snoopId' => $snoopId, |
|
| 606 | ] |
|
| 607 | ]); |
|
| 608 | } catch (RequestException $e) { |
|
| 609 | $this->processRequestException($e); |
|
| 610 | } |
|
| 611 | ||
| 612 | return new Channel($this->client, \GuzzleHttp\json_decode($response->getBody())); |
|
| 613 | } |
|
| 614 | ||
| 615 | /** |
|
| 616 | * Start snooping. Snoop (spy/whisper) on a specific channel. |
|
| @@ 628-645 (lines=18) @@ | ||
| 625 | * @throws InvalidParameterException |
|
| 626 | * @throws NotFoundException |
|
| 627 | */ |
|
| 628 | public function startSnoopWithId($channelId, $spy, $whisper, $app, $appArgs, $snoopId) |
|
| 629 | { |
|
| 630 | $uri = "channels/$channelId/snoop/$snoopId"; |
|
| 631 | try { |
|
| 632 | $response = $this->client->getEndpoint()->post($uri, [ |
|
| 633 | 'form_params' => [ |
|
| 634 | 'spy' => $spy, |
|
| 635 | 'whisper' => $whisper, |
|
| 636 | 'app' => $app, |
|
| 637 | 'appArgs' => $appArgs, |
|
| 638 | ] |
|
| 639 | ]); |
|
| 640 | } catch (RequestException $e) { |
|
| 641 | $this->processRequestException($e); |
|
| 642 | } |
|
| 643 | ||
| 644 | return new Channel($this->client, \GuzzleHttp\json_decode($response->getBody())); |
|
| 645 | } |
|
| 646 | ||
| 647 | /** |
|
| 648 | * @return string |
|