Copyright | (c) Alexandre Moreno 2019 |
---|---|
License | BSD3 |
Maintainer | alexmorenocano@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type Line = ReaderT ChannelToken ClientM
- runLine :: Line a -> ChannelToken -> IO (Either ServantError a)
- runLineWith :: (ClientM a -> IO (Either ServantError a)) -> Line a -> ChannelToken -> IO (Either ServantError a)
- getProfile :: Id User -> Line Profile
- getGroupMemberProfile :: Id Group -> Id User -> Line Profile
- leaveGroup :: Id Group -> Line NoContent
- getRoomMemberProfile :: Id Room -> Id User -> Line Profile
- leaveRoom :: Id Room -> Line NoContent
- replyMessage :: ReplyToken -> [Message] -> Line NoContent
- pushMessage :: Id a -> [Message] -> Line NoContent
- multicastMessage :: [Id User] -> [Message] -> Line NoContent
- getContent :: MessageId -> Line ByteString
- issueLinkToken :: Id User -> Line LinkToken
- issueChannelToken :: ClientCredentials -> ClientM ShortLivedChannelToken
- revokeChannelToken :: ChannelToken -> ClientM NoContent
Documentation
type Line = ReaderT ChannelToken ClientM Source #
Line
is the monad in which bot requests run. Contains the
OAuth access token for a channel
runLine :: Line a -> ChannelToken -> IO (Either ServantError a) Source #
Runs a Line
computation with the given channel access token
runLineWith :: (ClientM a -> IO (Either ServantError a)) -> Line a -> ChannelToken -> IO (Either ServantError a) Source #
Runs the monad with a different client evironment
Profile
Group
Room
Message
replyMessage :: ReplyToken -> [Message] -> Line NoContent Source #
getContent :: MessageId -> Line ByteString Source #