Ejemplo n.º 1
0
 private function email()
 {
     if ($this->get_request_method() !== 'GET') {
         $this->response('', API::STATUS_NOT_ACCEPTABLE);
     }
     $idEmail = (int) $this->_request['id'];
     if ($idEmail > 0) {
         $objeto = DBJson::getEmailByID($idEmail);
         if (!empty($objeto)) {
             $this->response($this->json($objeto), API::STATUS_OK);
         }
     }
     $this->response('', API::STATUS_NO_CONTENT);
 }