get() public static method

Get an existing recordings.
public static get ( Datasift_User $user, string $id = false ) : DataSift_Pylon
$user Datasift_User The Datasift user object
$id string The id of the existing pylon
return DataSift_Pylon
Exemplo n.º 1
0
 public function testGet()
 {
     $response = array('response_code' => 200, 'data' => array('volume' => '12300', 'start' => 1436085514, 'end' => 1436089932, 'status' => 'stopped', 'name' => 'birthday sample', 'reached_capacity' => false, 'identity_id' => '58d783dd98dd6b8bc7a39d73928fa7cf', 'hash' => '37fdfa811a6fb20785eecb9de9dd2d3e', 'remaining_index_capacity' => 1000000, 'remaining_account_capacity' => 927200), 'rate_limit' => 200, 'rate_limit_remaining' => 150);
     DataSift_MockApiClient::setResponse($response);
     $get = DataSift_Pylon::get($this->user, '37fdfa811a6fb20785eecb9de9dd2d3e');
     $this->assertEquals($get['hash'], '37fdfa811a6fb20785eecb9de9dd2d3e', 'Hash did not match');
     $this->assertEquals($get['name'], 'birthday sample', 'Name did not match');
 }