{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
module Telegram.Bot.API.Methods.SendMediaGroup where
import Data.Aeson (ToJSON (..))
import Data.Proxy
import GHC.Generics (Generic)
import Servant.API
import Servant.Client hiding (Response)
import Telegram.Bot.API.Internal.Utils
import Telegram.Bot.API.MakingRequests
import Telegram.Bot.API.Types
data SendMediaGroupRequest = SendMediaGroupRequest
{ SendMediaGroupRequest -> SomeChatId
sendMediaGroupChatId :: SomeChatId
, SendMediaGroupRequest -> Maybe MessageThreadId
sendMediaGroupMessageThreadId :: Maybe MessageThreadId
, SendMediaGroupRequest -> [InputMedia]
sendMediaGroupMedia :: [InputMedia]
, SendMediaGroupRequest -> Maybe Bool
sendMediaGroupDisableNotification :: Maybe Bool
, SendMediaGroupRequest -> Maybe Bool
sendMediaGroupProtectContent :: Maybe Bool
, SendMediaGroupRequest -> Maybe MessageId
sendMediaGroupReplyToMessageId :: Maybe MessageId
, SendMediaGroupRequest -> Maybe Bool
sendMediaGroupAllowSendingWithoutReply :: Maybe Bool
, SendMediaGroupRequest -> Maybe InlineKeyboardMarkup
sendMediaGroupReplyMarkup :: Maybe InlineKeyboardMarkup
}
deriving forall x. Rep SendMediaGroupRequest x -> SendMediaGroupRequest
forall x. SendMediaGroupRequest -> Rep SendMediaGroupRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SendMediaGroupRequest x -> SendMediaGroupRequest
$cfrom :: forall x. SendMediaGroupRequest -> Rep SendMediaGroupRequest x
Generic
instance ToJSON SendMediaGroupRequest where toJSON :: SendMediaGroupRequest -> Value
toJSON = forall a (d :: Meta) (f :: * -> *).
(Generic a, GToJSON Zero (Rep a), Rep a ~ D1 d f, Datatype d) =>
a -> Value
gtoJSON
type SendMediaGroup = "sendMediaGroup"
:> ReqBody '[JSON] SendMediaGroupRequest
:> Post '[JSON] (Response [Message])
sendMediaGroup :: SendMediaGroupRequest -> ClientM (Response [Message])
sendMediaGroup :: SendMediaGroupRequest -> ClientM (Response [Message])
sendMediaGroup = forall api.
HasClient ClientM api =>
Proxy api -> Client ClientM api
client (forall {k} (t :: k). Proxy t
Proxy @SendMediaGroup)