예제 #1
0
 /**
  * @return FortDetailsMessage
  */
 public function getRequestMessage()
 {
     $msg = new FortDetailsMessage();
     $msg->setFortId($this->fort->getId());
     $location = $this->fort->getLocation();
     $msg->setLatitude($location->getLatitude());
     $msg->setLongitude($location->getLongitude());
     return $msg;
 }
예제 #2
0
 /**
  * Get more detailed information about a pokestop.
  *
  * @return FortDetails
  */
 public function getDetails()
 {
     $reqMsg = new FortDetailsMessage();
     $reqMsg->setFortId($this->getId());
     $reqMsg->setLatitude($this->getLatitude());
     $reqMsg->setLongitude($this->getLongitude());
     $serverRequest = new ServerRequest(RequestType::FORT_DETAILS, $reqMsg);
     $this->pokemonGoAPI->getRequestHandler()->sendServerRequests($serverRequest);
     $response = new FortDetailsResponse($serverRequest->getData());
     return new FortDetails($response);
 }