Copyright | (c) Alexandre Moreno 2019 |
---|---|
License | BSD3 |
Maintainer | alexmorenocano@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type Line = ReaderT Auth ClientM
- runLine :: Line a -> ChannelToken -> IO (Either ServantError a)
- runLine' :: ClientM a -> IO (Either ServantError a)
- withLineEnv :: (ClientEnv -> IO a) -> IO 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
- getPushMessageCount :: Day -> Line (Maybe Int)
- getReplyMessageCount :: Day -> Line (Maybe Int)
- getMulticastMessageCount :: Day -> Line (Maybe Int)
- issueLinkToken :: Id User -> Line LinkToken
- issueChannelToken :: ChannelId -> ChannelSecret -> ClientM ShortLivedChannelToken
- revokeChannelToken :: ChannelToken -> ClientM NoContent
Documentation
type Line = ReaderT Auth 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
runLine' :: ClientM a -> IO (Either ServantError a) Source #
Executes a request in the LINE plaform (default)
Profile
Group
Room
Message
replyMessage :: ReplyToken -> [Message] -> Line NoContent Source #
getContent :: MessageId -> Line ByteString Source #
TODO: this should use a streaming library for constant memory usage over large data