3 abstract class TokenConduitAPIMethod
extends ConduitAPIMethod
{
5 final public function getApplication() {
6 return PhabricatorApplication
::getByClass('PhabricatorTokensApplication');
9 public function getMethodStatus() {
10 return self
::METHOD_STATUS_UNSTABLE
;
13 public function buildTokenDicts(array $tokens) {
14 assert_instances_of($tokens, 'PhabricatorToken');
17 foreach ($tokens as $token) {
19 'id' => $token->getID(),
20 'name' => $token->getName(),
21 'phid' => $token->getPHID(),
28 public function buildTokenGivenDicts(array $tokens_given) {
29 assert_instances_of($tokens_given, 'PhabricatorTokenGiven');
32 foreach ($tokens_given as $given) {
34 'authorPHID' => $given->getAuthorPHID(),
35 'objectPHID' => $given->getObjectPHID(),
36 'tokenPHID' => $given->getTokenPHID(),
37 'dateCreated' => $given->getDateCreated(),