ptgb
A complete Telegram Bot API client for Dart

Location, Venue & Contact

Part of the API Reference.

sendLocation

Future<Json> sendLocation(
    Object chatId,
    double latitude,
    double longitude, {
    String? businessConnectionId,
    int? messageThreadId,
    double? horizontalAccuracy,
    int? livePeriod,
    int? heading,
    int? proximityAlertRadius,
    bool? disableNotification,
    bool? protectContent,
    bool? allowPaidBroadcast,
    String? messageEffectId,
    ReplyParameters? replyParameters,
    ReplyMarkup? replyMarkup,
  }) async =>

Sends a point on the map. Set [livePeriod] to share a live, periodically updating location instead of a static point.

sendVenue

Future<Json> sendVenue(
    Object chatId,
    double latitude,
    double longitude,
    String title,
    String address, {
    String? businessConnectionId,
    int? messageThreadId,
    String? foursquareId,
    String? foursquareType,
    String? googlePlaceId,
    String? googlePlaceType,
    bool? disableNotification,
    bool? protectContent,
    bool? allowPaidBroadcast,
    String? messageEffectId,
    ReplyParameters? replyParameters,
    ReplyMarkup? replyMarkup,
  }) async =>

Sends information about a venue (a location plus a name and address).

sendContact

Future<Json> sendContact(
    Object chatId,
    String phoneNumber,
    String firstName, {
    String? businessConnectionId,
    int? messageThreadId,
    String? lastName,
    String? vcard,
    bool? disableNotification,
    bool? protectContent,
    bool? allowPaidBroadcast,
    String? messageEffectId,
    ReplyParameters? replyParameters,
    ReplyMarkup? replyMarkup,
  }) async =>

Sends a phone contact card.