public function getChannelSubscriptions($modifiedAfter = 0, $cursor = null, $limit = null)
    {
        $data = self::initData($modifiedAfter, $cursor, $limit);

        $subscriptions = Connection::sendCurlRequest(Connection::URL_SUBSCRIPTIONS, 'GET', $data, false,
            $this->apiKey)->subscriptions;

        $objChannels = [];

        foreach ($subscriptions as $s) {
            if (!empty($s->active)) {
                $objChannels[] = new Channel($s, $this->apiKey);
            }
        }

        $this->channels = $objChannels;

        return $objChannels;
    }
public function getChannelSubscriptions($modifiedAfter = 0, $cursor = null, $limit = null)
    {
        $data = self::initData($modifiedAfter, $cursor, $limit);

        $subscriptions = Connection::sendCurlRequest(Connection::URL_SUBSCRIPTIONS, 'GET', $data, false,
            $this->apiKey)->subscriptions;

        $objChannels = [];

        foreach ($subscriptions as $s) {
            if (!empty($s->active)) {
                $objChannels[] = new Channel($s, $this->apiKey);
            }
        }

        $this->channels = $objChannels;

        return $objChannels;
    }
public function getChannelSubscriptions ( $ modifiedAfter = 0 , $ cursor = null , $ limit = null ) { $ data = self :: initData ( $ modifiedAfter , $ cursor , $ limit ) ; $ subscriptions = Connection :: sendCurlRequest ( Connection :: URL_SUBSCRIPTIONS , 'GET' , $ data , false , $ this -> apiKey ) -> subscriptions ; $ objChannels = [ ] ; foreach ( $ subscriptions as $ s ) { if ( ! empty ( $ s -> active ) ) { $ objChannels [ ] = new Channel ( $ s , $ this -> apiKey ) ; } } $ this -> channels = $ objChannels ; return $ objChannels ; }
Get a list of the channels the current user is subscribed to.

@param int    $modifiedAfter Request contacts modified after this UNIX timestamp.
@param string $cursor        Request the next page via its cursor from a previous response. See the API
documentation (https://docs.pushbullet.com/http/) for a detailed description.
@param int    $limit         Maximum number of objects on each page.

@return Channel[] Channels.
@throws Exceptions\ConnectionException
@throws Exceptions\InvalidTokenException
@throws Exceptions\NotFoundException
Get a list of the channels the current user is subscribed to .