/**
  * Return the overall user informations.
  *
  * @ApiDoc(
  *   resource = true,
  *   description = "Return the overall User Informations",
  *   statusCodes = {
  *     200 = "Returned when successful",
  *     404 = "Returned when one of the information is not found"
  *   }
  * )
  *
  */
 public function getrecepeeAction(Request $request)
 {
     $response = new Response();
     $utf8 = new UserAPIController();
     $data = $utf8->utf8ize(array('addrecepee' => array('info' => '123')));
     $response->setContent(json_encode($data));
     $response->headers->set('Content-Type', 'application/json');
     return $response;
 }
Esempio n. 2
0
 /**
  * Return map
  *
  * @ApiDoc(
  *   resource = true,
  *   description = "This class gives you all the informations to calculate range between users,
  *   coordonates and recepee access example",
  *   statusCodes = {
  *     200 = "Returned when the successful",
  *     404 = "Returned when the user's address is not found"
  *   }
  * )
  *
  *
  *
  */
 public function geocodeAction()
 {
     $utf = new UserAPIController();
     $range = $this->rangeCalculus();
     $recepee = $this->getUserRecepee();
     $address = $this->getCurrentUserAddress();
     $coordonates = $this->getCoordonates();
     $data = $utf->utf8ize(array('currentAddress' => $address, 'distance' => $range, 'coordonates' => $coordonates, 'recepee' => $recepee));
     $view = $this->view($data);
     return $this->handleView($view);
 }