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