| License | MIT |
|---|---|
| Safe Haskell | None |
| Language | Haskell2010 |
BattlePlace.WebApi.Types
Description
Synopsis
- newtype ProjectId = ProjectId Base64Word64
- data Auth
- = Auth_itchJwtToken { }
- | Auth_itchApiKey {
- auth_itchApiKey :: !Text
- | Auth_steamEncryptedTicket { }
- | Auth_testKey {
- auth_testKey :: !Text
- auth_testId :: !StrWord64
- data AuthType
- authTypeOf :: Auth -> AuthType
- data Client
- = Client_itch { }
- | Client_steam { }
- | Client_test { }
- data ClientType
- clientTypeOf :: Client -> ClientType
- newtype DeveloperId = DeveloperId Base64Word64
- newtype ProjectServerId = ProjectServerId Base64Word64
- newtype ProjectServerToken = ProjectServerToken Text
- newtype ProjectServerName = ProjectServerName Text
- type MatchTeamSize = Int
- newtype MatchTag = MatchTag Text
- newtype ServerTag = ServerTag Text
- newtype MatchPlayerInfo = MatchPlayerInfo Value
- newtype MatchServerInfo = MatchServerInfo Value
- data MatchToken = MatchToken {
- data MatchFailureReason
- data SessionToken = SessionToken {}
- newtype SessionId = SessionId Base64ByteString
- newtype ServerSessionToken = ServerSessionToken {}
- newtype ExternalSessionId = ExternalSessionId Text
- data MatchSession = MatchSession {}
- data MatchServerSession = MatchServerSession {}
- newtype MatchTeam = MatchTeam (Vector MatchPlayer)
- data MatchPlayer = MatchPlayer {}
- data MatchServer = MatchServer {}
- data UserStats = UserStats {
- userStats_rank :: !Int
- userStats_rating :: !Rating
- data Identified i a = Identified {
- identified_id :: !i
- identified_info :: !a
- newtype Base64ByteString = Base64ByteString ByteString
- newtype Base64Word64 = Base64Word64 Word64
- newtype StrWord64 = StrWord64 Word64
Documentation
Project id.
Constructors
| ProjectId Base64Word64 |
Instances
| Eq ProjectId Source # | |
| Generic ProjectId Source # | |
| Hashable ProjectId Source # | |
Defined in BattlePlace.WebApi.Types | |
| ToJSON ProjectId Source # | |
Defined in BattlePlace.WebApi.Types | |
| FromJSON ProjectId Source # | |
| FromHttpApiData ProjectId Source # | |
Defined in BattlePlace.WebApi.Types Methods parseUrlPiece :: Text -> Either Text ProjectId # parseHeader :: ByteString -> Either Text ProjectId # | |
| ToSchema ProjectId Source # | |
Defined in BattlePlace.WebApi.Types Methods declareNamedSchema :: Proxy ProjectId -> Declare (Definitions Schema) NamedSchema # | |
| type Rep ProjectId Source # | |
Defined in BattlePlace.WebApi.Types type Rep ProjectId = D1 (MetaData "ProjectId" "BattlePlace.WebApi.Types" "battleplace-0.1.0.10-6kk5BOlJ1JJJuft5GhvMvB" True) (C1 (MetaCons "ProjectId" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Base64Word64))) | |
Constructors
| Auth_itchJwtToken | |
Fields | |
| Auth_itchApiKey | |
Fields
| |
| Auth_steamEncryptedTicket | |
Fields | |
| Auth_testKey | |
Fields
| |
Instances
Auth type (for logging).
Constructors
| AuthType_itchJwtToken | |
| AuthType_itchApiKey | |
| AuthType_steamEncryptedTicket | |
| AuthType_testKey |
Instances
| Eq AuthType Source # | |
| Generic AuthType Source # | |
| Hashable AuthType Source # | |
Defined in BattlePlace.WebApi.Types | |
| ToJSON AuthType Source # | |
Defined in BattlePlace.WebApi.Types | |
| FromJSON AuthType Source # | |
| ToSchema AuthType Source # | |
Defined in BattlePlace.WebApi.Types Methods declareNamedSchema :: Proxy AuthType -> Declare (Definitions Schema) NamedSchema # | |
| type Rep AuthType Source # | |
Defined in BattlePlace.WebApi.Types type Rep AuthType = D1 (MetaData "AuthType" "BattlePlace.WebApi.Types" "battleplace-0.1.0.10-6kk5BOlJ1JJJuft5GhvMvB" False) ((C1 (MetaCons "AuthType_itchJwtToken" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "AuthType_itchApiKey" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "AuthType_steamEncryptedTicket" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "AuthType_testKey" PrefixI False) (U1 :: Type -> Type))) | |
authTypeOf :: Auth -> AuthType Source #
Constructors
| Client_itch | |
Fields | |
| Client_steam | |
Fields | |
| Client_test | |
Fields | |
Instances
| Eq Client Source # | |
| Generic Client Source # | |
| Hashable Client Source # | |
Defined in BattlePlace.WebApi.Types | |
| ToJSON Client Source # | |
Defined in BattlePlace.WebApi.Types | |
| FromJSON Client Source # | |
| type Rep Client Source # | |
Defined in BattlePlace.WebApi.Types type Rep Client = D1 (MetaData "Client" "BattlePlace.WebApi.Types" "battleplace-0.1.0.10-6kk5BOlJ1JJJuft5GhvMvB" False) (C1 (MetaCons "Client_itch" PrefixI True) (S1 (MetaSel (Just "client_itchUserId") SourceUnpack SourceStrict DecidedStrict) (Rec0 StrWord64)) :+: (C1 (MetaCons "Client_steam" PrefixI True) (S1 (MetaSel (Just "client_steamId") SourceUnpack SourceStrict DecidedStrict) (Rec0 StrWord64)) :+: C1 (MetaCons "Client_test" PrefixI True) (S1 (MetaSel (Just "client_testId") SourceUnpack SourceStrict DecidedStrict) (Rec0 StrWord64)))) | |
data ClientType Source #
Type of the client. Must correspont to JSON field "type" of Client.
Constructors
| ClientType_itch | |
| ClientType_steam | |
| ClientType_test |
Instances
clientTypeOf :: Client -> ClientType Source #
newtype DeveloperId Source #
Developer id. At the moment it's just itch user id, but that may change.
Constructors
| DeveloperId Base64Word64 |
Instances
| ToJSON DeveloperId Source # | |
Defined in BattlePlace.WebApi.Types Methods toJSON :: DeveloperId -> Value # toEncoding :: DeveloperId -> Encoding # toJSONList :: [DeveloperId] -> Value # toEncodingList :: [DeveloperId] -> Encoding # | |
| FromJSON DeveloperId Source # | |
Defined in BattlePlace.WebApi.Types | |
| FromHttpApiData DeveloperId Source # | |
Defined in BattlePlace.WebApi.Types Methods parseUrlPiece :: Text -> Either Text DeveloperId # parseHeader :: ByteString -> Either Text DeveloperId # parseQueryParam :: Text -> Either Text DeveloperId # | |
newtype ProjectServerId Source #
Project's server id.
Constructors
| ProjectServerId Base64Word64 |
Instances
| Eq ProjectServerId Source # | |
Defined in BattlePlace.WebApi.Types Methods (==) :: ProjectServerId -> ProjectServerId -> Bool # (/=) :: ProjectServerId -> ProjectServerId -> Bool # | |
| Hashable ProjectServerId Source # | |
Defined in BattlePlace.WebApi.Types | |
| ToJSON ProjectServerId Source # | |
Defined in BattlePlace.WebApi.Types Methods toJSON :: ProjectServerId -> Value # toEncoding :: ProjectServerId -> Encoding # toJSONList :: [ProjectServerId] -> Value # toEncodingList :: [ProjectServerId] -> Encoding # | |
| ToJSONKey ProjectServerId Source # | |
Defined in BattlePlace.WebApi.Types | |
| FromJSON ProjectServerId Source # | |
Defined in BattlePlace.WebApi.Types Methods parseJSON :: Value -> Parser ProjectServerId # parseJSONList :: Value -> Parser [ProjectServerId] # | |
| FromJSONKey ProjectServerId Source # | |
Defined in BattlePlace.WebApi.Types | |
newtype ProjectServerToken Source #
Project's secret server token.
Constructors
| ProjectServerToken Text |
Instances
newtype ProjectServerName Source #
Project's server name.
Constructors
| ProjectServerName Text |
Instances
type MatchTeamSize = Int Source #
Size of a team in match request.
Match tag in match request.
Instances
| Eq MatchTag Source # | |
| Generic MatchTag Source # | |
| Semigroup MatchTag Source # | |
| Monoid MatchTag Source # | |
| Hashable MatchTag Source # | |
Defined in BattlePlace.WebApi.Types | |
| ToJSON MatchTag Source # | |
Defined in BattlePlace.WebApi.Types | |
| FromJSON MatchTag Source # | |
| ToSchema MatchTag Source # | |
Defined in BattlePlace.WebApi.Types Methods declareNamedSchema :: Proxy MatchTag -> Declare (Definitions Schema) NamedSchema # | |
| type Rep MatchTag Source # | |
Defined in BattlePlace.WebApi.Types | |
Server tag in match request.
Instances
| Eq ServerTag Source # | |
| Generic ServerTag Source # | |
| Semigroup ServerTag Source # | |
| Monoid ServerTag Source # | |
| Hashable ServerTag Source # | |
Defined in BattlePlace.WebApi.Types | |
| ToJSON ServerTag Source # | |
Defined in BattlePlace.WebApi.Types | |
| FromJSON ServerTag Source # | |
| ToSchema ServerTag Source # | |
Defined in BattlePlace.WebApi.Types Methods declareNamedSchema :: Proxy ServerTag -> Declare (Definitions Schema) NamedSchema # | |
| type Rep ServerTag Source # | |
Defined in BattlePlace.WebApi.Types | |
newtype MatchPlayerInfo Source #
Opaque player info.
Constructors
| MatchPlayerInfo Value |
Instances
newtype MatchServerInfo Source #
Opaque server info.
Constructors
| MatchServerInfo Value |
Instances
data MatchToken Source #
Match token.
Constructors
| MatchToken | |
Instances
| Generic MatchToken Source # | |
Defined in BattlePlace.WebApi.Types Associated Types type Rep MatchToken :: Type -> Type # | |
| ToJSON MatchToken Source # | |
Defined in BattlePlace.WebApi.Types Methods toJSON :: MatchToken -> Value # toEncoding :: MatchToken -> Encoding # toJSONList :: [MatchToken] -> Value # toEncodingList :: [MatchToken] -> Encoding # | |
| FromJSON MatchToken Source # | |
Defined in BattlePlace.WebApi.Types | |
| ToSchema MatchToken Source # | |
Defined in BattlePlace.WebApi.Types Methods declareNamedSchema :: Proxy MatchToken -> Declare (Definitions Schema) NamedSchema # | |
| type Rep MatchToken Source # | |
data MatchFailureReason Source #
Reason of match failure.
Constructors
| MatchFailureReason_timedOut | Failed to make a match in a specified time. |
| MatchFailureReason_noServer | Match was made, but no server is available (and use of server is mandatory). |
| MatchFailureReason_cancelled | Matching was explicitly cancelled by user. |
Instances
data SessionToken Source #
Session token.
Constructors
| SessionToken | |
Fields | |
Instances
Session id.
Constructors
| SessionId Base64ByteString |
Instances
| Eq SessionId Source # | |
| Generic SessionId Source # | |
| Hashable SessionId Source # | |
Defined in BattlePlace.WebApi.Types | |
| ToJSON SessionId Source # | |
Defined in BattlePlace.WebApi.Types | |
| FromJSON SessionId Source # | |
| ToSchema SessionId Source # | |
Defined in BattlePlace.WebApi.Types Methods declareNamedSchema :: Proxy SessionId -> Declare (Definitions Schema) NamedSchema # | |
| type Rep SessionId Source # | |
Defined in BattlePlace.WebApi.Types type Rep SessionId = D1 (MetaData "SessionId" "BattlePlace.WebApi.Types" "battleplace-0.1.0.10-6kk5BOlJ1JJJuft5GhvMvB" True) (C1 (MetaCons "SessionId" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Base64ByteString))) | |
newtype ServerSessionToken Source #
Server session token.
Constructors
| ServerSessionToken | |
Fields | |
Instances
newtype ExternalSessionId Source #
External session token for exposure to clients and servers.
Constructors
| ExternalSessionId Text |
Instances
data MatchSession Source #
Match session.
Constructors
| MatchSession | |
Instances
data MatchServerSession Source #
Match server session.
Constructors
| MatchServerSession | |
Instances
Match team.
Constructors
| MatchTeam (Vector MatchPlayer) |
Instances
| Generic MatchTeam Source # | |
| ToJSON MatchTeam Source # | |
Defined in BattlePlace.WebApi.Types | |
| FromJSON MatchTeam Source # | |
| ToSchema MatchTeam Source # | |
Defined in BattlePlace.WebApi.Types Methods declareNamedSchema :: Proxy MatchTeam -> Declare (Definitions Schema) NamedSchema # | |
| type Rep MatchTeam Source # | |
Defined in BattlePlace.WebApi.Types type Rep MatchTeam = D1 (MetaData "MatchTeam" "BattlePlace.WebApi.Types" "battleplace-0.1.0.10-6kk5BOlJ1JJJuft5GhvMvB" True) (C1 (MetaCons "MatchTeam" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vector MatchPlayer)))) | |
data MatchPlayer Source #
Match player.
Constructors
| MatchPlayer | |
Fields | |
Instances
data MatchServer Source #
Match server.
Constructors
| MatchServer | |
Fields | |
Instances
User stats.
Constructors
| UserStats | |
Fields
| |
Instances
| Generic UserStats Source # | |
| ToJSON UserStats Source # | |
Defined in BattlePlace.WebApi.Types | |
| FromJSON UserStats Source # | |
| ToSchema UserStats Source # | |
Defined in BattlePlace.WebApi.Types Methods declareNamedSchema :: Proxy UserStats -> Declare (Definitions Schema) NamedSchema # | |
| type Rep UserStats Source # | |
Defined in BattlePlace.WebApi.Types type Rep UserStats = D1 (MetaData "UserStats" "BattlePlace.WebApi.Types" "battleplace-0.1.0.10-6kk5BOlJ1JJJuft5GhvMvB" False) (C1 (MetaCons "UserStats" PrefixI True) (S1 (MetaSel (Just "userStats_rank") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Just "userStats_rating") SourceUnpack SourceStrict DecidedStrict) (Rec0 Rating))) | |
data Identified i a Source #
Generic data type for id + object.
Constructors
| Identified | |
Fields
| |
Instances
newtype Base64ByteString Source #
ByteString which serializes to JSON as base64 string.
Constructors
| Base64ByteString ByteString |
Instances
newtype Base64Word64 Source #
Word64 which serializes to JSON as base64 string. Useful because 64-bit integer is not representable in javascript.
Constructors
| Base64Word64 Word64 |
Instances
Word64 which serializes to JSON as decimal string. Useful because 64-bit integer is not representable in javascript.
Instances
| Eq StrWord64 Source # | |
| Num StrWord64 Source # | |
Defined in BattlePlace.WebApi.Types.Util | |
| Ord StrWord64 Source # | |
| Read StrWord64 Source # | |
| Show StrWord64 Source # | |
| Hashable StrWord64 Source # | |
Defined in BattlePlace.WebApi.Types.Util | |
| ToJSON StrWord64 Source # | |
Defined in BattlePlace.WebApi.Types.Util | |
| FromJSON StrWord64 Source # | |
| Storable StrWord64 Source # | |
Defined in BattlePlace.WebApi.Types.Util | |
| Serialize StrWord64 Source # | |
| FromHttpApiData StrWord64 Source # | |
Defined in BattlePlace.WebApi.Types.Util Methods parseUrlPiece :: Text -> Either Text StrWord64 # parseHeader :: ByteString -> Either Text StrWord64 # | |
| ToSchema StrWord64 Source # | |
Defined in BattlePlace.WebApi.Types.Util Methods declareNamedSchema :: Proxy StrWord64 -> Declare (Definitions Schema) NamedSchema # | |