Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/conduit/UserAddStatusConduitAPIMethod.php
Show All 14 Lines | final class UserAddStatusConduitAPIMethod extends UserConduitAPIMethod { | ||||
} | } | ||||
public function getMethodStatusDescription() { | public function getMethodStatusDescription() { | ||||
return pht( | return pht( | ||||
'Statuses are becoming full-fledged events as part of the '. | 'Statuses are becoming full-fledged events as part of the '. | ||||
'Calendar application.'); | 'Calendar application.'); | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
$status_const = $this->formatStringConstants(array('away', 'sporadic')); | $status_const = $this->formatStringConstants(array('away', 'sporadic')); | ||||
return array( | return array( | ||||
'fromEpoch' => 'required int', | 'fromEpoch' => 'required int', | ||||
'toEpoch' => 'required int', | 'toEpoch' => 'required int', | ||||
'status' => 'required '.$status_const, | 'status' => 'required '.$status_const, | ||||
'description' => 'optional string', | 'description' => 'optional string', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'void'; | return 'void'; | ||||
} | } | ||||
public function defineErrorTypes() { | protected function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR-BAD-EPOCH' => "'toEpoch' must be bigger than 'fromEpoch'.", | 'ERR-BAD-EPOCH' => "'toEpoch' must be bigger than 'fromEpoch'.", | ||||
'ERR-OVERLAP' => | 'ERR-OVERLAP' => | ||||
'There must be no status in any part of the specified epoch.', | 'There must be no status in any part of the specified epoch.', | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
Show All 20 Lines |