public function resume()
{
if ($this->_deleted) {
throw new DataSift_Exception_InvalidData('Cannot resume a deleted Historic.');
}
if ($this->_playback_id === false || strlen($this->_playback_id) == 0) {
throw new DataSift_Exception_InvalidData('Cannot resume a historic query that hasn\'t been prepared.');
}
try {
$res = $this->_user->post('historics/resume', array('id' => $this->_playback_id));
} catch (DataSift_Exception_APIError $e) {
switch ($e->getCode()) {
case 400:
// Missing or invalid parameters
throw new DataSift_Exception_InvalidData($e->getMessage());
case 404:
// Historic query not found
throw new DataSift_Exception_InvalidData($e->getMessage());
default:
throw new DataSift_Exception_APIError('Unexpected APIError code: ' . $e->getCode() . ' [' . $e->getMessage() . ']');
}
}
}