| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Web.Slack.Common
Description
Synopsis
- newtype Color = Color {}
- newtype UserId = UserId {}
- newtype ConversationId = ConversationId {}
- newtype TeamId = TeamId {}
- newtype Cursor = Cursor {}
- data SlackTimestamp = SlackTimestamp {}
- mkSlackTimestamp :: UTCTime -> SlackTimestamp
- timestampFromText :: Text -> Either String SlackTimestamp
- data Message = Message {}
- data MessageType = MessageTypeMessage
- data SlackClientError
- newtype SlackMessageText = SlackMessageText {}
Documentation
Instances
| FromJSON Color Source # | |
| ToJSON Color Source # | |
Defined in Web.Slack.Types | |
| Generic Color Source # | |
| Show Color Source # | |
| NFData Color Source # | |
Defined in Web.Slack.Types | |
| Eq Color Source # | |
| Ord Color Source # | |
| Hashable Color Source # | |
Defined in Web.Slack.Types | |
| type Rep Color Source # | |
Defined in Web.Slack.Types | |
Instances
| FromJSON UserId Source # | |
| ToJSON UserId Source # | |
Defined in Web.Slack.Types | |
| Generic UserId Source # | |
| Show UserId Source # | |
| NFData UserId Source # | |
Defined in Web.Slack.Types | |
| Eq UserId Source # | |
| Ord UserId Source # | |
| Hashable UserId Source # | |
Defined in Web.Slack.Types | |
| ToHttpApiData UserId Source # | |
Defined in Web.Slack.Types Methods toUrlPiece :: UserId -> Text # toEncodedUrlPiece :: UserId -> Builder # toHeader :: UserId -> ByteString # toQueryParam :: UserId -> Text # | |
| type Rep UserId Source # | |
Defined in Web.Slack.Types | |
newtype ConversationId Source #
Common identifier for every type of Conversation.
Unique to the team which the conversation belongs to.
Ord to allow it to be a key of a Map
Constructors
| ConversationId | |
Fields | |
Instances
Instances
| FromJSON TeamId Source # | |
| ToJSON TeamId Source # | |
Defined in Web.Slack.Types | |
| Generic TeamId Source # | |
| Show TeamId Source # | |
| NFData TeamId Source # | |
Defined in Web.Slack.Types | |
| Eq TeamId Source # | |
| Ord TeamId Source # | |
| Hashable TeamId Source # | |
Defined in Web.Slack.Types | |
| ToHttpApiData TeamId Source # | |
Defined in Web.Slack.Types Methods toUrlPiece :: TeamId -> Text # toEncodedUrlPiece :: TeamId -> Builder # toHeader :: TeamId -> ByteString # toQueryParam :: TeamId -> Text # | |
| type Rep TeamId Source # | |
Defined in Web.Slack.Types | |
Instances
| FromJSON Cursor Source # | |
| ToJSON Cursor Source # | |
Defined in Web.Slack.Pager.Types | |
| Generic Cursor Source # | |
| Show Cursor Source # | |
| NFData Cursor Source # | |
Defined in Web.Slack.Pager.Types | |
| Eq Cursor Source # | |
| Hashable Cursor Source # | |
Defined in Web.Slack.Pager.Types | |
| ToHttpApiData Cursor Source # | |
Defined in Web.Slack.Pager.Types Methods toUrlPiece :: Cursor -> Text # toEncodedUrlPiece :: Cursor -> Builder # toHeader :: Cursor -> ByteString # toQueryParam :: Cursor -> Text # | |
| type Rep Cursor Source # | |
Defined in Web.Slack.Pager.Types | |
data SlackTimestamp Source #
Constructors
| SlackTimestamp | |
Fields | |
Instances
timestampFromText :: Text -> Either String SlackTimestamp Source #
Convert timestamp texts e.g. "1595719220.011100" into SlackTimestamp
Constructors
| Message | |
Fields
| |
Instances
| FromJSON Message Source # | |
| ToJSON Message Source # | |
Defined in Web.Slack.Common | |
| Generic Message Source # | |
| Show Message Source # | |
| NFData Message Source # | |
Defined in Web.Slack.Common | |
| Eq Message Source # | |
| type Rep Message Source # | |
Defined in Web.Slack.Common type Rep Message = D1 ('MetaData "Message" "Web.Slack.Common" "slack-web-1.5.0.0-JuKKPWQb8GZ9iOuMskKzDQ" 'False) (C1 ('MetaCons "Message" 'PrefixI 'True) ((S1 ('MetaSel ('Just "messageType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MessageType) :*: S1 ('MetaSel ('Just "messageUser") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UserId))) :*: (S1 ('MetaSel ('Just "messageText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SlackMessageText) :*: S1 ('MetaSel ('Just "messageTs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SlackTimestamp)))) | |
data MessageType Source #
Constructors
| MessageTypeMessage |
Instances
| FromJSON MessageType Source # | |
Defined in Web.Slack.Common | |
| ToJSON MessageType Source # | |
Defined in Web.Slack.Common Methods toJSON :: MessageType -> Value # toEncoding :: MessageType -> Encoding # toJSONList :: [MessageType] -> Value # toEncodingList :: [MessageType] -> Encoding # | |
| Generic MessageType Source # | |
Defined in Web.Slack.Common Associated Types type Rep MessageType :: Type -> Type # | |
| Show MessageType Source # | |
Defined in Web.Slack.Common Methods showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # | |
| NFData MessageType Source # | |
Defined in Web.Slack.Common Methods rnf :: MessageType -> () # | |
| Eq MessageType Source # | |
Defined in Web.Slack.Common | |
| type Rep MessageType Source # | |
data SlackClientError Source #
Errors that can be triggered by a slack request.
Constructors
| ServantError ClientError | errors from the network connection |
| SlackError Text | errors returned by the slack API |
Instances
newtype SlackMessageText Source #
Message text in the format returned by Slack,
see https://api.slack.com/docs/message-formatting
Consider using messageToHtml for displaying.
Constructors
| SlackMessageText | |
Fields | |