line-bot-sdk-0.7.2: Haskell SDK for LINE Messaging API
Copyright(c) Alexandre Moreno 2019-2021
LicenseBSD-3-Clause
Maintaineralexmorenocano@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Line.Bot.Client

Description

 
Synopsis

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 :: NFData a => Line a -> ChannelToken -> IO (Either ClientError a) Source #

Executes a request in the LINE plaform with the given ChannelToken

withLine :: Line a -> ChannelToken -> (Either ClientError a -> IO b) -> IO b Source #

Execute a request with a streaming response in the LINE platform

withLineEnv :: (ClientEnv -> IO a) -> IO a Source #

Perform a request using LINE ClientEnv

withLineEnv $ \env -> runClientM comp env

Profile

Group

Room

Message

getContentS :: MessageId -> Line (SourceIO ByteString) Source #

This is an streaming version of getContent meant to be used with coroutine libraries like pipes, conduits, streaming, etc. You need and instance of FromSourceIO, see e.g. servant-conduit.

Example:

getContentC :: MessageId -> Line (ConduitT () ByteString IO ())
getContentC = fmap fromSourceIO . getContentS

Account Link

OAuth

Rich menus