A list of past deployments.
public DeployHistory ( string $orderBy = '' ) : ArrayList | ||
$orderBy | string | - the name of a DB column to sort in descending order |
Результат | ArrayList |
/** * @param \SS_HTTPRequest $request * @return \SS_HTTPResponse */ public function history(\SS_HTTPRequest $request) { $data = []; $list = $this->environment->DeployHistory('DeployStarted'); $fromTimestamp = $request->requestVar('from'); if ($fromTimestamp) { $from = SS_Datetime::create(); $from->setValue($fromTimestamp); $list = $list->filter('LastEdited:GreaterThan', $from->Format('Y-m-d H:i:s')); } foreach ($list as $deployment) { $data[] = $this->formatter->getDeploymentData($deployment); } return $this->getAPIResponse(['list' => $data], 200); }