Copyright | (c) Will Sewell 2016 |
---|---|
License | MIT |
Maintainer | me@willsewell.com |
Stability | stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Types representing the JSON format of Pusher messages.
There are also types for query string parameters.
Synopsis
- newtype ChannelInfo = ChannelInfo {}
- data ChannelInfoAttributes
- newtype ChannelInfoQuery = ChannelInfoQuery (HashSet ChannelInfoAttributes)
- newtype ChannelsInfo = ChannelsInfo (HashMap Text ChannelInfo)
- newtype ChannelsInfoQuery = ChannelsInfoQuery (HashSet ChannelsInfoAttributes)
- data ChannelsInfoAttributes = ChannelsUserCount
- data FullChannelInfo = FullChannelInfo {}
- newtype User = User {}
- newtype Users = Users [User]
- class ToURLParam a
- toURLParam :: ToURLParam a => a -> Text
Documentation
newtype ChannelInfo Source #
The possible returned channel attributes when multiple when multiple channels are queried.
Instances
FromJSON ChannelInfo Source # | |
Defined in Network.Pusher.Protocol parseJSON :: Value -> Parser ChannelInfo # parseJSONList :: Value -> Parser [ChannelInfo] # | |
Show ChannelInfo Source # | |
Defined in Network.Pusher.Protocol showsPrec :: Int -> ChannelInfo -> ShowS # show :: ChannelInfo -> String # showList :: [ChannelInfo] -> ShowS # | |
Eq ChannelInfo Source # | |
Defined in Network.Pusher.Protocol (==) :: ChannelInfo -> ChannelInfo -> Bool # (/=) :: ChannelInfo -> ChannelInfo -> Bool # |
data ChannelInfoAttributes Source #
Enumeration of the attributes that can be queried about a single channel.
Instances
Generic ChannelInfoAttributes Source # | |
Defined in Network.Pusher.Protocol type Rep ChannelInfoAttributes :: Type -> Type # | |
Eq ChannelInfoAttributes Source # | |
Defined in Network.Pusher.Protocol (==) :: ChannelInfoAttributes -> ChannelInfoAttributes -> Bool # (/=) :: ChannelInfoAttributes -> ChannelInfoAttributes -> Bool # | |
Hashable ChannelInfoAttributes Source # | |
Defined in Network.Pusher.Protocol hashWithSalt :: Int -> ChannelInfoAttributes -> Int # hash :: ChannelInfoAttributes -> Int # | |
ToURLParam ChannelInfoAttributes Source # | |
Defined in Network.Pusher.Protocol | |
type Rep ChannelInfoAttributes Source # | |
Defined in Network.Pusher.Protocol type Rep ChannelInfoAttributes = D1 ('MetaData "ChannelInfoAttributes" "Network.Pusher.Protocol" "pusher-http-haskell-2.1.0.13-sMzerp21zdJvvg6jnFzSK" 'False) (C1 ('MetaCons "ChannelUserCount" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChannelSubscriptionCount" 'PrefixI 'False) (U1 :: Type -> Type)) |
newtype ChannelInfoQuery Source #
A set of requested ChannelInfoAttributes
.
Instances
ToURLParam ChannelInfoQuery Source # | |
Defined in Network.Pusher.Protocol toURLParam :: ChannelInfoQuery -> Text Source # |
newtype ChannelsInfo Source #
A map of channels to their ChannelInfo
. The result of querying channel
info from multiple channels.
Instances
FromJSON ChannelsInfo Source # | |
Defined in Network.Pusher.Protocol parseJSON :: Value -> Parser ChannelsInfo # parseJSONList :: Value -> Parser [ChannelsInfo] # | |
Show ChannelsInfo Source # | |
Defined in Network.Pusher.Protocol showsPrec :: Int -> ChannelsInfo -> ShowS # show :: ChannelsInfo -> String # showList :: [ChannelsInfo] -> ShowS # | |
Eq ChannelsInfo Source # | |
Defined in Network.Pusher.Protocol (==) :: ChannelsInfo -> ChannelsInfo -> Bool # (/=) :: ChannelsInfo -> ChannelsInfo -> Bool # |
newtype ChannelsInfoQuery Source #
A set of requested ChannelsInfoAttributes
.
Instances
ToURLParam ChannelsInfoQuery Source # | |
Defined in Network.Pusher.Protocol toURLParam :: ChannelsInfoQuery -> Text Source # |
data ChannelsInfoAttributes Source #
Enumeration of the attributes that can be queried about multiple channels.
Instances
Generic ChannelsInfoAttributes Source # | |
Defined in Network.Pusher.Protocol type Rep ChannelsInfoAttributes :: Type -> Type # | |
Eq ChannelsInfoAttributes Source # | |
Defined in Network.Pusher.Protocol | |
Hashable ChannelsInfoAttributes Source # | |
Defined in Network.Pusher.Protocol hashWithSalt :: Int -> ChannelsInfoAttributes -> Int # hash :: ChannelsInfoAttributes -> Int # | |
ToURLParam ChannelsInfoAttributes Source # | |
Defined in Network.Pusher.Protocol | |
type Rep ChannelsInfoAttributes Source # | |
data FullChannelInfo Source #
The possible values returned by a query to a single channel.
Instances
FromJSON FullChannelInfo Source # | |
Defined in Network.Pusher.Protocol parseJSON :: Value -> Parser FullChannelInfo # parseJSONList :: Value -> Parser [FullChannelInfo] # | |
Show FullChannelInfo Source # | |
Defined in Network.Pusher.Protocol showsPrec :: Int -> FullChannelInfo -> ShowS # show :: FullChannelInfo -> String # showList :: [FullChannelInfo] -> ShowS # | |
Eq FullChannelInfo Source # | |
Defined in Network.Pusher.Protocol (==) :: FullChannelInfo -> FullChannelInfo -> Bool # (/=) :: FullChannelInfo -> FullChannelInfo -> Bool # |
The data about a user returned when querying for users in a presence channel.
A list of users returned by querying for users in a presence channel.
class ToURLParam a Source #
Types that can be serialised to a querystring parameter value.
Instances
ToURLParam ChannelInfoAttributes Source # | |
Defined in Network.Pusher.Protocol | |
ToURLParam ChannelInfoQuery Source # | |
Defined in Network.Pusher.Protocol toURLParam :: ChannelInfoQuery -> Text Source # | |
ToURLParam ChannelsInfoAttributes Source # | |
Defined in Network.Pusher.Protocol | |
ToURLParam ChannelsInfoQuery Source # | |
Defined in Network.Pusher.Protocol toURLParam :: ChannelsInfoQuery -> Text Source # | |
ToURLParam a => ToURLParam (HashSet a) Source # | |
Defined in Network.Pusher.Protocol toURLParam :: HashSet a -> Text Source # |
toURLParam :: ToURLParam a => a -> Text Source #