Changeset View
Changeset View
Standalone View
Standalone View
src/applications/paste/conduit/PasteInfoConduitAPIMethod.php
Show All 12 Lines | final class PasteInfoConduitAPIMethod extends PasteConduitAPIMethod { | ||||
public function getMethodStatusDescription() { | public function getMethodStatusDescription() { | ||||
return "Replaced by 'paste.query'."; | return "Replaced by 'paste.query'."; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Retrieve an array of information about a paste.'; | return 'Retrieve an array of information about a paste.'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'paste_id' => 'required id', | 'paste_id' => 'required id', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'nonempty dict'; | return 'nonempty dict'; | ||||
} | } | ||||
public function defineErrorTypes() { | protected function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR_BAD_PASTE' => 'No such paste exists', | 'ERR_BAD_PASTE' => 'No such paste exists', | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$paste_id = $request->getValue('paste_id'); | $paste_id = $request->getValue('paste_id'); | ||||
$paste = id(new PhabricatorPasteQuery()) | $paste = id(new PhabricatorPasteQuery()) | ||||
Show All 11 Lines |