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

        $devices = Connection::sendCurlRequest(Connection::URL_DEVICES, 'GET', $data, true, $this->apiKey)->devices;

        $objDevices = [];

        foreach ($devices as $d) {
            if (!empty($d->active)) {
                $objDevices[] = new Device($d, $this->apiKey);
            }
        }

        $this->devices = $objDevices;

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

        $devices = Connection::sendCurlRequest(Connection::URL_DEVICES, 'GET', $data, true, $this->apiKey)->devices;

        $objDevices = [];

        foreach ($devices as $d) {
            if (!empty($d->active)) {
                $objDevices[] = new Device($d, $this->apiKey);
            }
        }

        $this->devices = $objDevices;

        return $objDevices;
    }
public function getDevices ( $ modifiedAfter = 0 , $ cursor = null , $ limit = null ) { $ data = self :: initData ( $ modifiedAfter , $ cursor , $ limit ) ; $ devices = Connection :: sendCurlRequest ( Connection :: URL_DEVICES , 'GET' , $ data , true , $ this -> apiKey ) -> devices ; $ objDevices = [ ] ; foreach ( $ devices as $ d ) { if ( ! empty ( $ d -> active ) ) { $ objDevices [ ] = new Device ( $ d , $ this -> apiKey ) ; } } $ this -> devices = $ objDevices ; return $ objDevices ; }
Get a list of available devices.

@param int    $modifiedAfter Request devices 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 Device[] Devices.
@throws Exceptions\ConnectionException
@throws Exceptions\InvalidTokenException
Get a list of available devices .