Skip to content

Commit 15885af

Browse files
authored
Update Api.php
1 parent d47bd74 commit 15885af

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/Api.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct($api_address, $auth_key, $secret)
3333
* trigger an event by providing event name and payload.
3434
* Optionally provide a socket ID to exclude a client (most likely the sender).
3535
*
36-
* @param array $channels An array of channel names to publish the event on.
36+
* @param array|string $channels An array of channel names to publish the event on.
3737
* @param string $event
3838
* @param mixed $data Event data
3939
* @param string $socket_id [optional]
@@ -83,17 +83,7 @@ public function getChannelInfo($channel, $params = array())
8383

8484
public function getChannels($params = array())
8585
{
86-
throw new PushException('getChannels is not implemented');
87-
$response = $this->get('/channels', $params);
88-
89-
if ($response['status'] === 200) {
90-
$response = json_decode($response['body']);
91-
$response->channels = get_object_vars($response->channels);
92-
} else {
93-
$response = false;
94-
}
95-
96-
return $response;
86+
return $this->get('/channels', $params);
9787
}
9888

9989
private function checkCompatibility()

0 commit comments

Comments
 (0)