packages feed

telegram-bot-api-7.4.5 / src / Telegram / Bot / API / Methods / SendVenue.hs

{-# LANGUAGE DataKinds #-}{-# LANGUAGE DeriveGeneric #-}{-# LANGUAGE TypeApplications #-}{-# LANGUAGE TypeOperators #-}module Telegram.Bot.API.Methods.SendVenue whereimport Data.Aeson (FromJSON (..), ToJSON (..))import Data.Proxyimport Data.Textimport GHC.Generics (Generic)import Servant.APIimport Servant.Client hiding (Response)import Telegram.Bot.API.Internal.Utilsimport Telegram.Bot.API.MakingRequestsimport Telegram.Bot.API.Typesimport Telegram.Bot.API.Internal.TH-- ** 'sendVenue'-- | Request parameters for 'sendVenue'.data SendVenueRequest = SendVenueRequest  { sendVenueBusinessConnectionId :: Maybe BusinessConnectionId -- ^ Unique identifier of the business connection on behalf of which the message will be sent.  , sendVenueChatId :: SomeChatId -- ^ Unique identifier for the target chat or username of the target channel (in the format @channelusername).  , sendVenueMessageThreadId :: Maybe MessageThreadId -- ^ Unique identifier for the target message thread (topic) of the forum; for forum supergroups only.  , sendVenueLatitude :: Float -- ^ Latitude of the venue  , sendVenueLongitude :: Float -- ^ Longitude of the venue  , sendVenueTitle :: Text -- ^ Name of the venue  , sendVenueAddress :: Text -- ^ Address of the venue  , sendVenueFoursquareId :: Maybe Text -- ^ Foursquare identifier of the venue  , sendVenueFoursquareType :: Maybe Text -- ^ Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)  , sendVenueGooglePlaceId :: Maybe Text -- ^ Google Places identifier of the venue  , sendVenueGooglePlaceType :: Maybe Text -- ^ Google Places type of the venue. (See supported types <https:\/\/developers.google.com\/maps\/documentation\/places\/web-service\/supported_types>.)  , sendVenueDisableNotification :: Maybe Bool -- ^ Sends the message silently. Users will receive a notification with no sound.  , sendVenueProtectContent :: Maybe Bool -- ^ Protects the contents of the sent message from forwarding and saving.  , sendVenueMessageEffectId :: Maybe Text -- ^ Unique identifier of the message effect to be added to the message; for private chats only.  , sendVenueReplyToMessageId :: Maybe MessageId -- ^ If the message is a reply, ID of the original message.  , sendVenueReplyParameters :: Maybe ReplyParameters -- ^ Description of the message to reply to.  , sendVenueReplyMarkup :: Maybe InlineKeyboardMarkup -- ^ Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.  }  deriving Genericinstance ToJSON   SendVenueRequest where toJSON = gtoJSONinstance FromJSON SendVenueRequest where parseJSON = gparseJSONtype SendVenue = "sendVenue"  :> ReqBody '[JSON] SendVenueRequest  :> Post '[JSON] (Response Message)-- | Use this method to send information about a venue.--   On success, the sent Message is returned.sendVenue :: SendVenueRequest ->  ClientM (Response Message)sendVenue = client (Proxy @SendVenue)makeDefault ''SendVenueRequest