Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SendGameRequest = SendGameRequest {
- sendGameRequestChatId :: ChatId
- sendGameRequestGameShortName :: Text
- sendGameRequestDisableNotification :: Maybe Bool
- sendGameProtectContent :: Maybe Bool
- sendGameRequestReplyToMessageId :: Maybe MessageId
- sendGameRequestAllowSendingWithoutReply :: Maybe Bool
- sendGameRequestReplyMarkup :: Maybe InlineKeyboardMarkup
- data SetGameScoreRequest = SetGameScoreRequest {
- setGameScoreRequestUserId :: UserId
- setGameScoreRequestScore :: Integer
- setGameScoreRequestForce :: Maybe Bool
- setGameScoreRequestDisableEditMessage :: Maybe Bool
- setGameScoreRequestChatId :: Maybe ChatId
- setGameScoreRequestMessageId :: Maybe MessageId
- setGameScoreRequestInlineMessageId :: Maybe MessageId
- data SetGameScoreResult
- data GetGameHighScoresRequest = GetGameHighScoresRequest {}
- type SendGame = "sendGame" :> (ReqBody '[JSON] SendGameRequest :> Post '[JSON] (Response Message))
- sendGame :: SendGameRequest -> ClientM (Response Message)
- type SetGameScore = "setGameScore" :> (ReqBody '[JSON] SetGameScoreRequest :> Post '[JSON] (Response SetGameScoreResult))
- setGameScore :: SetGameScoreRequest -> ClientM (Response SetGameScoreResult)
- type GetGameHighScores = "getGameHighScores" :> (ReqBody '[JSON] GetGameHighScoresRequest :> Post '[JSON] (Response [GameHighScore]))
Types
SendGameRequest
data SendGameRequest Source #
SendGameRequest | |
|
Instances
SetGameScoreRequest
data SetGameScoreRequest Source #
SetGameScoreRequest | |
|
Instances
SetGameScoreResult
data SetGameScoreResult Source #
Instances
GetGameHighScoresRequest
data GetGameHighScoresRequest Source #
GetGameHighScoresRequest | |
|
Instances
Methods
sendGame
type SendGame = "sendGame" :> (ReqBody '[JSON] SendGameRequest :> Post '[JSON] (Response Message)) Source #
sendGame :: SendGameRequest -> ClientM (Response Message) Source #
Use this method to send a game. On success, the sent Message
is returned.
setGameScore
type SetGameScore = "setGameScore" :> (ReqBody '[JSON] SetGameScoreRequest :> Post '[JSON] (Response SetGameScoreResult)) Source #
setGameScore :: SetGameScoreRequest -> ClientM (Response SetGameScoreResult) Source #
Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message
is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.
getGameHighScores
type GetGameHighScores = "getGameHighScores" :> (ReqBody '[JSON] GetGameHighScoresRequest :> Post '[JSON] (Response [GameHighScore])) Source #