Differential D12380 Diff 29771 src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php
<?php | <?php | ||||
final class DifferentialCreateCommentConduitAPIMethod | final class DifferentialCreateCommentConduitAPIMethod | ||||
extends DifferentialConduitAPIMethod { | extends DifferentialConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'differential.createcomment'; | return 'differential.createcomment'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return pht('Add a comment to a Differential revision.'); | return pht('Add a comment to a Differential revision.'); | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'revision_id' => 'required revisionid', | 'revision_id' => 'required revisionid', | ||||
'message' => 'optional string', | 'message' => 'optional string', | ||||
'action' => 'optional string', | 'action' => 'optional string', | ||||
'silent' => 'optional bool', | 'silent' => 'optional bool', | ||||
'attach_inlines' => 'optional bool', | 'attach_inlines' => 'optional bool', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'nonempty dict'; | return 'nonempty dict'; | ||||
} | } | ||||
public function defineErrorTypes() { | protected function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR_BAD_REVISION' => 'Bad revision ID.', | 'ERR_BAD_REVISION' => 'Bad revision ID.', | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$viewer = $request->getUser(); | $viewer = $request->getUser(); | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |