add askgame query json instance
This commit is contained in:
@@ -167,6 +167,8 @@ instance ToJSON Query where
|
|||||||
object ["query" .= ("skat" :: String), "cards" .= cards, "bid" .= bid ]
|
object ["query" .= ("skat" :: String), "cards" .= cards, "bid" .= bid ]
|
||||||
toJSON (CardsQuery cards) =
|
toJSON (CardsQuery cards) =
|
||||||
object ["query" .= ("cards" :: String), "cards" .= cards ]
|
object ["query" .= ("cards" :: String), "cards" .= cards ]
|
||||||
|
toJSON (AskGameQuery bid) =
|
||||||
|
object ["query" .= ("ask_game" :: String), "bid" .= bid]
|
||||||
|
|
||||||
instance FromJSON ChosenResponse where
|
instance FromJSON ChosenResponse where
|
||||||
parseJSON = withObject "ChosenResponse" $ \v -> ChosenResponse
|
parseJSON = withObject "ChosenResponse" $ \v -> ChosenResponse
|
||||||
|
|||||||
Reference in New Issue
Block a user