Skip to content

Commit

Permalink
Merge pull request #18 from feltkamptv/patch-1
Browse files Browse the repository at this point in the history
Added sendContact and sendVenue functions
  • Loading branch information
mgp25 committed May 23, 2016
2 parents 7281d4e + e6dbf12 commit f7cf715
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/Telegram.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,51 @@ public function sendLocation($chat_id, $latitude, $longitude, $reply_to_message_
return $this->sendRequest('sendLocation', $params);
}

/**
* Send Venue.
*
* @link https://core.telegram.org/bots/api#sendvenue
*
* @param int $chat_id
* @param float $latitude
* @param float $longitude
* @param string $title
* @param string $address
* @param string $foursquare_id
* @param int $reply_to_message_id
* @param KeyboardMarkup $reply_markup
*
* @return Array
*/
public function sendVenue($chat_id, $latitude, $longitude, $title, $address, $foursquare_id = null, $reply_to_message_id = null, $reply_markup = null)
{
$params = compact('chat_id', 'latitude', 'longitude', 'title', 'address', 'foursquare_id', 'reply_to_message_id', 'reply_markup');

return $this->sendRequest('sendVenue', $params);
}

/**
* Send Contact.
*
* @link https://core.telegram.org/bots/api#sendcontact
*
* @param int $chat_id
* @param string $phonenumber
* @param string $first_name
* @param string $last_name
* @param bool $disable_notification
* @param int $reply_to_message_id
* @param KeyboardMarkup $reply_markup
*
* @return Array
*/
public function sendContact($chat_id, $phone_number, $first_name, $last_name = null, $reply_to_message_id = null, $reply_markup = null)
{
$params = compact('chat_id', 'phone_number', 'first_name', 'last_name', 'reply_to_message_id', 'reply_markup');

return $this->sendRequest('sendContact', $params);
}

/**
* Send Chat Action.
*
Expand Down

0 comments on commit f7cf715

Please sign in to comment.