public function fillObjectFromData(DoorkeeperExternalObject $obj, $result)
 {
     // Convert the "self" URI, which points at the REST endpoint, into a
     // browse URI.
     $self = idx($result, 'self');
     $object_id = $obj->getObjectID();
     $uri = self::getJIRAIssueBrowseURIFromJIRARestURI($self, $object_id);
     if ($uri !== null) {
         $obj->setObjectURI($uri);
     }
 }
 public function fillObjectFromData(DoorkeeperExternalObject $obj, $result)
 {
     $body = $result->getBody();
     $uri = $body['html_url'];
     $obj->setObjectURI($uri);
     $title = idx($body, 'title');
     $description = idx($body, 'body');
     $created = idx($body, 'created_at');
     $created = strtotime($created);
     $state = idx($body, 'state');
     $obj->setProperty('task.title', $title);
     $obj->setProperty('task.description', $description);
     $obj->setProperty('task.created', $created);
     $obj->setProperty('task.state', $state);
 }
 public function fillObjectFromData(DoorkeeperExternalObject $obj, $result)
 {
     $id = $result['id'];
     $uri = "https://app.asana.com/0/{$id}/{$id}";
     $obj->setObjectURI($uri);
 }
 public function fillObjectFromData(DoorkeeperExternalObject $obj, $spec)
 {
     $uri = $spec['html_url'];
     $obj->setObjectURI($uri);
     $login = $spec['login'];
     $obj->setDisplayName(pht('%s <%s>', $login, pht('GitHub')));
 }