Exemplo n.º 1
0
 public function testSendLocation()
 {
     $replyMarkup = new ReplyKeyboardMarkup([]);
     /** @var ApiClient $apiClient */
     $apiClient = $this->apiClientTest("sendLocation", new Message(), ["chat_id" => 1, "latitude" => "lat", "longitude" => "long", "reply_to_message_id" => 2, "reply_markup" => $replyMarkup->toArray()]);
     $apiClient->sendLocation(1, "lat", "long", 2, $replyMarkup);
 }
Exemplo n.º 2
0
 /**
  * @param int $chatId
  * @param string $latitude
  * @param string $longitude
  * @param int|null $replyToMessageId
  * @param ReplyKeyboardMarkup|ReplyKeyboardHide|ForceReply|null $replyMarkup
  * @return Message
  */
 public function sendLocation($chatId, $latitude, $longitude, $replyToMessageId = null, $replyMarkup = null)
 {
     $response = $this->apiRequest("sendLocation", ["chat_id" => $chatId, "latitude" => $latitude, "longitude" => $longitude, "reply_to_message_id" => $replyToMessageId, "reply_markup" => $replyMarkup ? $replyMarkup->toArray() : null]);
     return $this->entityFromBody($response->getBody(), new Message());
 }