public function sample($filter = false, $start = false, $end = false, $count = false, $id = false)
{
if ($id) {
$this->_id = $id;
}
if (strlen($this->_id) == 0) {
throw new DataSift_Exception_InvalidData('Unable to retrieve pylon sample without an ID');
}
$params = array('id' => $this->_id);
if ($start) {
$params['start'] = $start;
}
if ($end) {
$params['end'] = $end;
}
if ($count) {
$params['count'] = $count;
}
if ($filter) {
$params['filter'] = $filter;
return $this->_user->post('pylon/sample', $params);
} else {
return $this->_user->get('pylon/sample', $params);
}
}