Differential D10585 Diff 25583 src/applications/conpherence/conduit/ConpherenceQueryTransactionConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conpherence/conduit/ConpherenceQueryTransactionConduitAPIMethod.php
Show All 14 Lines | return pht( | ||||
'transactions within the conpherence for the logged in user.'); | 'transactions within the conpherence for the logged in user.'); | ||||
} | } | ||||
public function defineParamTypes() { | public function defineParamTypes() { | ||||
return array( | return array( | ||||
'threadID' => 'optional int', | 'threadID' => 'optional int', | ||||
'threadPHID' => 'optional phid', | 'threadPHID' => 'optional phid', | ||||
'limit' => 'optional int', | 'limit' => 'optional int', | ||||
'offset' => 'optional int' | 'offset' => 'optional int', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | public function defineReturnType() { | ||||
return 'nonempty dict'; | return 'nonempty dict'; | ||||
} | } | ||||
public function defineErrorTypes() { | public function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR_USAGE_NO_THREAD_ID' => pht( | 'ERR_USAGE_NO_THREAD_ID' => pht( | ||||
'You must specify a thread id or thread phid to query transactions '. | 'You must specify a thread id or thread phid to query transactions '. | ||||
'from.') | 'from.'), | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$user = $request->getUser(); | $user = $request->getUser(); | ||||
$thread_id = $request->getValue('threadID'); | $thread_id = $request->getValue('threadID'); | ||||
$thread_phid = $request->getValue('threadPHID'); | $thread_phid = $request->getValue('threadPHID'); | ||||
$limit = $request->getValue('limit'); | $limit = $request->getValue('limit'); | ||||
Show All 39 Lines | foreach ($transactions as $transaction) { | ||||
'transactionTitle' => $title, | 'transactionTitle' => $title, | ||||
'transactionComment' => $comment, | 'transactionComment' => $comment, | ||||
'transactionOldValue' => $transaction->getOldValue(), | 'transactionOldValue' => $transaction->getOldValue(), | ||||
'transactionNewValue' => $transaction->getNewValue(), | 'transactionNewValue' => $transaction->getNewValue(), | ||||
'transactionMetadata' => $transaction->getMetadata(), | 'transactionMetadata' => $transaction->getMetadata(), | ||||
'authorPHID' => $transaction->getAuthorPHID(), | 'authorPHID' => $transaction->getAuthorPHID(), | ||||
'dateCreated' => $transaction->getDateCreated(), | 'dateCreated' => $transaction->getDateCreated(), | ||||
'conpherenceID' => $conpherence->getID(), | 'conpherenceID' => $conpherence->getID(), | ||||
'conpherencePHID' => $conpherence->getPHID()); | 'conpherencePHID' => $conpherence->getPHID(), | ||||
); | |||||
} | } | ||||
return $data; | return $data; | ||||
} | } | ||||
} | } |