Copyright | (c) Will Sewell, 2015 |
---|---|
License | MIT |
Maintainer | [email protected] |
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.
- data Channel = Channel {}
- data ChannelInfo = ChannelInfo {}
- data ChannelInfoAttributes
- newtype ChannelInfoQuery = ChannelInfoQuery (HashSet ChannelInfoAttributes)
- newtype ChannelsInfo = ChannelsInfo (HashMap Channel ChannelInfo)
- newtype ChannelsInfoQuery = ChannelsInfoQuery (HashSet ChannelsInfoAttributes)
- data ChannelsInfoAttributes = ChannelsUserCount
- data ChannelType
- data FullChannelInfo = FullChannelInfo {}
- data User = User {}
- newtype Users = Users [User]
- parseChannel :: Text -> Channel
- renderChannel :: Channel -> Text
- renderChannelPrefix :: ChannelType -> Text
- toURLParam :: ToURLParam a => a -> Text
Documentation
The channel name (not including the channel type prefix) and its type.
Constructors
Channel | |
Fields |
data ChannelInfo Source
The possible returned channel attributes when multiple when multiple channels are queried.
Constructors
ChannelInfo | |
Fields |
Instances
data ChannelInfoAttributes Source
Enumeration of the attributes that can be queried about a single channel.
Constructors
ChannelUserCount | |
ChannelSubscriptionCount |
newtype ChannelInfoQuery Source
A set of requested ChannelInfoAttributes.
Constructors
ChannelInfoQuery (HashSet ChannelInfoAttributes) |
newtype ChannelsInfo Source
A map of channels to their ChannelInfo. The result of querying channel info from multuple channels.
Constructors
ChannelsInfo (HashMap Channel ChannelInfo) |
Instances
newtype ChannelsInfoQuery Source
A set of requested ChannelsInfoAttributes.
Constructors
ChannelsInfoQuery (HashSet ChannelsInfoAttributes) |
data ChannelsInfoAttributes Source
Enumeration of the attributes that can be queried about multiple channels.
Constructors
ChannelsUserCount |
data ChannelType Source
The possible types of Pusher channe.
data FullChannelInfo Source
The possible values returned by a query to a single channel
Constructors
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.
parseChannel :: Text -> Channel Source
Convert string representation, e.g. private-chan into the datatype
renderChannel :: Channel -> Text Source
toURLParam :: ToURLParam a => a -> Text Source
Convert the data into a querystring parameter value.