2017-04-02 61 views

回答

0

有一個功能,一個簡單的庫從雲數據庫中刪除所有目標。但起初它可以獲得所有目標。也許你可以看看它。 https://github.com/FionNoir/VuforiaClient

功能應該看起來像:

public function getAllTargets() { 
     $ch = curl_init(self::BASE_URL . self::TARGETS_PATH); 
     curl_setopt($ch, CURLOPT_HTTPHEADER, $this->getHeaders('GET')); 
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
     $response = curl_exec($ch); 
     $info = curl_getinfo($ch); 
     if ($info['http_code'] !== 200) { 
      die('Failed to list targets: ' . $response . "\n"); 
     } 
     $targets = json_decode($response); 
    } 
+0

我已經添加了功能 'getAllTargets'。它應該工作,但我沒有嘗試 –