*/
public function get(): stdClass
{
- $id = random_int(100, 1000);
-
- $response = $this->connection->query($id, 'channel.list');
-
- if($id !== $response->id) {
- throw new Exception('Invalid ID. This is not the expected reply.');
- }
+ $response = $this->connection->query('channel.list');
if(!is_bool($response)) {
return $response;
*/
public function show(array $params): stdClass
{
- $id = random_int(100, 1000);
-
- $response = $this->connection->query($id, 'channel.get', ['channel' => $params['channel']]);
-
- if($id !== $response->id) {
- throw new Exception('Invalid ID. This is not the expected reply.');
- }
+ $response = $this->connection->query('channel.get', ['channel' => $params['channel']]);
if (!is_bool($response)) {
return $response;