Changeset View
Changeset View
Standalone View
Standalone View
src/applications/feed/conduit/FeedPublishConduitAPIMethod.php
<?php | <?php | ||||
final class FeedPublishConduitAPIMethod extends FeedConduitAPIMethod { | final class FeedPublishConduitAPIMethod extends FeedConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'feed.publish'; | return 'feed.publish'; | ||||
} | } | ||||
public function getMethodStatus() { | public function getMethodStatus() { | ||||
return self::METHOD_STATUS_UNSTABLE; | return self::METHOD_STATUS_UNSTABLE; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Publish a story to the feed.'; | return 'Publish a story to the feed.'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'type' => 'required string', | 'type' => 'required string', | ||||
'data' => 'required dict', | 'data' => 'required dict', | ||||
'time' => 'optional int', | 'time' => 'optional int', | ||||
); | ); | ||||
} | } | ||||
public function defineErrorTypes() { | protected function defineReturnType() { | ||||
return array( | |||||
); | |||||
} | |||||
public function defineReturnType() { | |||||
return 'nonempty phid'; | return 'nonempty phid'; | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$type = $request->getValue('type'); | $type = $request->getValue('type'); | ||||
$data = $request->getValue('data'); | $data = $request->getValue('data'); | ||||
$time = $request->getValue('time'); | $time = $request->getValue('time'); | ||||
Show All 16 Lines |