Exemplo n.º 1
0
 protected function getResultNotFound()
 {
     $response = new \Buzz\Message\Response();
     $response->addHeader('HTTP/1.1 404 Not Found');
     return $response;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
0
 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;
 }