Changeset View
Changeset View
Standalone View
Standalone View
src/applications/chatlog/conduit/ChatLogQueryConduitAPIMethod.php
<?php | <?php | ||||
final class ChatLogQueryConduitAPIMethod extends ChatLogConduitAPIMethod { | final class ChatLogQueryConduitAPIMethod extends ChatLogConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'chatlog.query'; | return 'chatlog.query'; | ||||
} | } | ||||
public function getMethodStatus() { | public function getMethodStatus() { | ||||
return self::METHOD_STATUS_UNSTABLE; | return self::METHOD_STATUS_UNSTABLE; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Retrieve chatter.'; | return 'Retrieve chatter.'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'channels' => 'optional list<string>', | 'channels' => 'optional list<string>', | ||||
'limit' => 'optional int (default = 100)', | 'limit' => 'optional int (default = 100)', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'nonempty list<dict>'; | return 'nonempty list<dict>'; | ||||
} | } | ||||
public function defineErrorTypes() { | |||||
return array(); | |||||
} | |||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$query = new PhabricatorChatLogQuery(); | $query = new PhabricatorChatLogQuery(); | ||||
$channel_ids = $request->getValue('channelIDs'); | $channel_ids = $request->getValue('channelIDs'); | ||||
if ($channel_ids) { | if ($channel_ids) { | ||||
$query->withChannelIDs($channel_ids); | $query->withChannelIDs($channel_ids); | ||||
} | } | ||||
Show All 24 Lines |