Differential D12380 Diff 29723 src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php
<?php | <?php | ||||
final class DifferentialGetCommitMessageConduitAPIMethod | final class DifferentialGetCommitMessageConduitAPIMethod | ||||
extends DifferentialConduitAPIMethod { | extends DifferentialConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'differential.getcommitmessage'; | return 'differential.getcommitmessage'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Retrieve Differential commit messages or message templates.'; | return 'Retrieve Differential commit messages or message templates.'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
$edit_types = array('edit', 'create'); | $edit_types = array('edit', 'create'); | ||||
return array( | return array( | ||||
'revision_id' => 'optional revision_id', | 'revision_id' => 'optional revision_id', | ||||
'fields' => 'optional dict<string, wild>', | 'fields' => 'optional dict<string, wild>', | ||||
'edit' => 'optional '.$this->formatStringConstants($edit_types), | 'edit' => 'optional '.$this->formatStringConstants($edit_types), | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'nonempty string'; | return 'nonempty string'; | ||||
} | } | ||||
public function defineErrorTypes() { | protected function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR_NOT_FOUND' => 'Revision was not found.', | 'ERR_NOT_FOUND' => 'Revision was not found.', | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$id = $request->getValue('revision_id'); | $id = $request->getValue('revision_id'); | ||||
$viewer = $request->getUser(); | $viewer = $request->getUser(); | ||||
▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines |