protected function getResultNotFound() { $response = new \Buzz\Message\Response(); $response->addHeader('HTTP/1.1 404 Not Found'); return $response; }
private function getResultEmails($additionalEmails = array()) { $emails = array('*****@*****.**', '*****@*****.**'); $response = new \Buzz\Message\Response(); $response->setContent(array_merge($emails, $additionalEmails)); $response->addHeader('HTTP/1.1 200 OK'); return $response; }
private function getResultFollowing() { $data = array(array('login' => 'octocat', 'id' => 1, 'gravatar_url' => 'https://github.com/images/error/octocat_happy.gif', 'url' => 'https://api.github.com/users/octocat')); $response = new \Buzz\Message\Response(); $response->setContent($data); $response->addHeader('HTTP/1.1 200 OK'); return $response; }
private function getResultGist($details = array()) { $gists = $this->getGists(); $response = new \Buzz\Message\Response(); $response->setContent(array_merge($gists[0], $details)); $response->addHeader('HTTP/1.1 200 OK'); return $response; }
private function getResultKey($details = array()) { $key = array('url' => 'https://api.github.com/user/keys/1', 'id' => 1, 'title' => 'octocat@octomac', 'key' => 'ssh-rsa AAA...'); $response = new \Buzz\Message\Response(); $response->setContent(array_merge($key, $details)); $response->addHeader('HTTP/1.1 200 OK'); return $response; }