Differential D12380 Diff 29771 src/applications/differential/conduit/DifferentialCreateRevisionConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/conduit/DifferentialCreateRevisionConduitAPIMethod.php
<?php | <?php | ||||
final class DifferentialCreateRevisionConduitAPIMethod | final class DifferentialCreateRevisionConduitAPIMethod | ||||
extends DifferentialConduitAPIMethod { | extends DifferentialConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'differential.createrevision'; | return 'differential.createrevision'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return pht('Create a new Differential revision.'); | return pht('Create a new Differential revision.'); | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
// TODO: Arcanist passes this; prevent fatals after D4191 until Conduit | // TODO: Arcanist passes this; prevent fatals after D4191 until Conduit | ||||
// version 7 or newer. | // version 7 or newer. | ||||
'user' => 'ignored', | 'user' => 'ignored', | ||||
'diffid' => 'required diffid', | 'diffid' => 'required diffid', | ||||
'fields' => 'required dict', | 'fields' => 'required dict', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'nonempty dict'; | return 'nonempty dict'; | ||||
} | } | ||||
public function defineErrorTypes() { | protected function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR_BAD_DIFF' => 'Bad diff ID.', | 'ERR_BAD_DIFF' => 'Bad diff ID.', | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$viewer = $request->getUser(); | $viewer = $request->getUser(); | ||||
Show All 25 Lines |