Copyright | (c) Will Sewell 2016 |
---|---|
License | MIT |
Maintainer | [email protected] |
Stability | stable |
Safe Haskell | None |
Language | Haskell2010 |
Network.Pusher.Protocol
Description
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.
Constructors
ChannelInfo | |
Fields |
Instances
FromJSON ChannelInfo Source # | |
Defined in Network.Pusher.Protocol | |
Show ChannelInfo Source # | |
Defined in Network.Pusher.Protocol Methods showsPrec :: Int -> ChannelInfo -> ShowS # show :: ChannelInfo -> String # showList :: [ChannelInfo] -> ShowS # | |
Eq ChannelInfo Source # | |
Defined in Network.Pusher.Protocol |
data ChannelInfoAttributes Source #
Enumeration of the attributes that can be queried about a single channel.
Constructors
ChannelUserCount | |
ChannelSubscriptionCount |
Instances
newtype ChannelInfoQuery Source #
A set of requested ChannelInfoAttributes
.
Constructors
ChannelInfoQuery (HashSet ChannelInfoAttributes) |
Instances
ToURLParam ChannelInfoQuery Source # | |
Defined in Network.Pusher.Protocol Methods toURLParam :: ChannelInfoQuery -> Text Source # |
newtype ChannelsInfo Source #
A map of channels to their ChannelInfo
. The result of querying channel
info from multiple channels.
Constructors
ChannelsInfo (HashMap Text ChannelInfo) |
Instances
FromJSON ChannelsInfo Source # | |
Defined in Network.Pusher.Protocol | |
Show ChannelsInfo Source # | |
Defined in Network.Pusher.Protocol Methods showsPrec :: Int -> ChannelsInfo -> ShowS # show :: ChannelsInfo -> String # showList :: [ChannelsInfo] -> ShowS # | |
Eq ChannelsInfo Source # | |
Defined in Network.Pusher.Protocol |
newtype ChannelsInfoQuery Source #
A set of requested ChannelsInfoAttributes
.
Constructors
ChannelsInfoQuery (HashSet ChannelsInfoAttributes) |
Instances
ToURLParam ChannelsInfoQuery Source # | |
Defined in Network.Pusher.Protocol Methods toURLParam :: ChannelsInfoQuery -> Text Source # |
data ChannelsInfoAttributes Source #
Enumeration of the attributes that can be queried about multiple channels.
Constructors
ChannelsUserCount |
Instances
Generic ChannelsInfoAttributes Source # | |||||
Defined in Network.Pusher.Protocol Associated Types
Methods from :: ChannelsInfoAttributes -> Rep ChannelsInfoAttributes x # to :: Rep ChannelsInfoAttributes x -> ChannelsInfoAttributes # | |||||
Eq ChannelsInfoAttributes Source # | |||||
Defined in Network.Pusher.Protocol Methods (==) :: ChannelsInfoAttributes -> ChannelsInfoAttributes -> Bool # (/=) :: ChannelsInfoAttributes -> ChannelsInfoAttributes -> Bool # | |||||
Hashable ChannelsInfoAttributes Source # | |||||
Defined in Network.Pusher.Protocol Methods hashWithSalt :: Int -> ChannelsInfoAttributes -> Int # hash :: ChannelsInfoAttributes -> Int # | |||||
ToURLParam ChannelsInfoAttributes Source # | |||||
Defined in Network.Pusher.Protocol Methods | |||||
type Rep ChannelsInfoAttributes Source # | |||||
data FullChannelInfo Source #
The possible values returned by a query to a single channel.
Constructors
FullChannelInfo | |
Instances
FromJSON FullChannelInfo Source # | |
Defined in Network.Pusher.Protocol Methods parseJSON :: Value -> Parser FullChannelInfo # parseJSONList :: Value -> Parser [FullChannelInfo] # | |
Show FullChannelInfo Source # | |
Defined in Network.Pusher.Protocol Methods showsPrec :: Int -> FullChannelInfo -> ShowS # show :: FullChannelInfo -> String # showList :: [FullChannelInfo] -> ShowS # | |
Eq FullChannelInfo Source # | |
Defined in Network.Pusher.Protocol Methods (==) :: 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.
Minimal complete definition
Instances
ToURLParam ChannelInfoAttributes Source # | |
Defined in Network.Pusher.Protocol Methods | |
ToURLParam ChannelInfoQuery Source # | |
Defined in Network.Pusher.Protocol Methods toURLParam :: ChannelInfoQuery -> Text Source # | |
ToURLParam ChannelsInfoAttributes Source # | |
Defined in Network.Pusher.Protocol Methods | |
ToURLParam ChannelsInfoQuery Source # | |
Defined in Network.Pusher.Protocol Methods toURLParam :: ChannelsInfoQuery -> Text Source # | |
ToURLParam a => ToURLParam (HashSet a) Source # | |
Defined in Network.Pusher.Protocol Methods toURLParam :: HashSet a -> Text Source # |
toURLParam :: ToURLParam a => a -> Text Source #