License | MIT |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
BattlePlace.WebApi
Description
Documentation
type WebApi = "v1a" :> (("client" :> (("auth" :> (ReqBody '[JSON] ClientAuthRequest :> Post '[JSON] ClientAuthResponse)) :<|> (("match" :> ((AuthProtect ClientToken :> (ReqBody '[JSON] MatchRequest :> Post '[JSON] MatchResponse)) :<|> ((AuthProtect ClientToken :> (Capture "matchToken" (InternalToken MatchToken) :> Get '[JSON] MatchStatusResponse)) :<|> (AuthProtect ClientToken :> (Capture "matchToken" (InternalToken MatchToken) :> Delete '[JSON] ()))))) :<|> (("session" :> (Capture "sessionToken" (InternalToken SessionToken) :> ("result" :> (AuthProtect ClientToken :> (ReqBody '[JSON] SessionResultRequest :> Post '[JSON] ()))))) :<|> ("info" :> ("stats" :> (AuthProtect ClientToken :> Get '[JSON] UserStats))))))) :<|> ("server" :> (("match" :> ((ReqBody '[JSON] ServerMatchRequest :> Post '[JSON] ServerMatchResponse) :<|> ((ReqBody '[JSON] ServerMatchCancelRequest :> Delete '[JSON] ServerMatchCancelResponse) :<|> ("sessions" :> (ReqBody '[JSON] ServerMatchSessionsRequest :> Post '[JSON] ServerMatchSessionsResponse))))) :<|> ("session" :> (Capture "serverSessionToken" (InternalToken ServerSessionToken) :> ("result" :> (ReqBody '[JSON] ServerSessionResultRequest :> Post '[JSON] ()))))))) Source #
data ClientAuthRequest Source #
Constructors
ClientAuthRequest | |
Fields |
Instances
data ClientAuthResponse Source #
Constructors
ClientAuthResponse_authenticated | |
ClientAuthResponse_notAuthenticated | |
Fields |
Instances
data MatchRequest Source #
Constructors
MatchRequest | |
Fields |
Instances
data MatchResponse Source #
Constructors
MatchResponse | |
Fields |
Instances
Generic MatchResponse Source # | |
Defined in BattlePlace.WebApi Associated Types type Rep MatchResponse :: * -> * # | |
ToJSON MatchResponse Source # | |
Defined in BattlePlace.WebApi Methods toJSON :: MatchResponse -> Value # toEncoding :: MatchResponse -> Encoding # toJSONList :: [MatchResponse] -> Value # toEncodingList :: [MatchResponse] -> Encoding # | |
FromJSON MatchResponse Source # | |
Defined in BattlePlace.WebApi Methods parseJSON :: Value -> Parser MatchResponse # parseJSONList :: Value -> Parser [MatchResponse] # | |
type Rep MatchResponse Source # | |
Defined in BattlePlace.WebApi type Rep MatchResponse = D1 (MetaData "MatchResponse" "BattlePlace.WebApi" "battleplace-0.1.0.7-GzTbf17NQ257znzzAEUSPC" False) (C1 (MetaCons "MatchResponse" PrefixI True) (S1 (MetaSel (Just "matchResponse_matchToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (InternalToken MatchToken)))) |
data MatchStatusResponse Source #
Constructors
MatchStatusResponse_notFound | |
MatchStatusResponse_inProgress | |
MatchStatusResponse_matched | |
Fields | |
MatchStatusResponse_failed | |
Fields |
Instances
data SessionResultRequest Source #
Constructors
SessionResultRequest_finished | |
Fields | |
SessionResultRequest_cancelled |
Instances
data ServerMatchRequest Source #
Constructors
ServerMatchRequest | |
Fields |
Instances
data ServerMatchResponse Source #
Instances
Generic ServerMatchResponse Source # | |
Defined in BattlePlace.WebApi Associated Types type Rep ServerMatchResponse :: * -> * # Methods from :: ServerMatchResponse -> Rep ServerMatchResponse x # to :: Rep ServerMatchResponse x -> ServerMatchResponse # | |
ToJSON ServerMatchResponse Source # | |
Defined in BattlePlace.WebApi Methods toJSON :: ServerMatchResponse -> Value # toEncoding :: ServerMatchResponse -> Encoding # toJSONList :: [ServerMatchResponse] -> Value # toEncodingList :: [ServerMatchResponse] -> Encoding # | |
FromJSON ServerMatchResponse Source # | |
Defined in BattlePlace.WebApi Methods parseJSON :: Value -> Parser ServerMatchResponse # parseJSONList :: Value -> Parser [ServerMatchResponse] # | |
type Rep ServerMatchResponse Source # | |
Defined in BattlePlace.WebApi |
data ServerMatchCancelRequest Source #
Constructors
ServerMatchCancelRequest | |
Instances
data ServerMatchCancelResponse Source #
Instances
data ServerMatchSessionsRequest Source #
Constructors
ServerMatchSessionsRequest | |
Instances
data ServerMatchSessionsResponse Source #
Constructors
ServerMatchSessionsResponse | |
Instances
data ServerSessionResultRequest Source #
Constructors
ServerSessionResultRequest_finished | |
Fields | |
ServerSessionResultRequest_cancelled |