-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell SDK for the LINE API -- -- This package exports bindings to LINE APIs. -- -- It provides the following features: -- -- -- -- For example usages, please see the examples directory. @package line @version 3.0.0 -- | This module is to define aliases commonly used in other modules. module Line.Messaging.Common.Types -- | A type alias to specify an identifier of something. type ID = Text -- | A type alias to specify a URL. type URL = Text -- | A type alias to specify a channel secret. About issueing and using the -- channel secret, please refer to corresponding LINE documentations. type ChannelSecret = Text -- | A type alias to specify a channel access token. About issueing and -- using the channel access token, please refer to corresponding LINE -- documentations. type ChannelAccessToken = Text -- | A type alias for postback data. type Postback = Text -- | This module provides types to be used with Line.Messaging.API. module Line.Messaging.API.Types -- | A type class representing types to be converted into Message. -- -- It has toType and toObject as its minimal complete -- definition, but it is not recommended to define any extra instance, as -- the new type may not work with the LINE APIs. -- -- About existing messageable types, please refer to the following -- instances. Each instance is matched with a message object described in -- the LINE documentation. class Messageable a where toValue a = object $ ("type" .= toType a) : toObject a -- | A type representing a message to be sent. -- -- The data constructor converts Messageable into Message. -- It allows different types of Messageable to be sent through a -- single API call. -- -- An example usage is like below. -- --
--   pushTextAndImage :: ID -> APIIO ()
--   pushTextAndImage identifier = push identifier [
--     Message $ Text "hello",
--     Message $ Image "https://example.com/image.jpg" "https://example.com/preview.jpg"
--     ]
--   
data Message Message :: a -> Message -- | Messageable for text data. -- -- It contains Text of Data.Text. Its corresponding JSON -- spec is described here. -- -- This type is also used to decode text event message from webhook -- request. About the webhook usage, please refer to EventMessage -- in Line.Messaging.Webhook.Types. newtype Text Text :: Text -> Text [getText] :: Text -> Text -- | Messageable for image data. -- -- It contains URLs of an original image and its preview. Its -- corresponding JSON spec is described here. data Image Image :: URL -> URL -> Image [getImageURL] :: Image -> URL [getImagePreviewURL] :: Image -> URL -- | Messageable for video data. -- -- It contains URLs of an original video and its preview. Its -- corresponding JSON spec is described here. data Video Video :: URL -> URL -> Video [getVideoURL] :: Video -> URL [getVideoPreviewURL] :: Video -> URL -- | Messageable for audio data. -- -- It contains a URL of an audio, and its duration in milliseconds. Its -- corresponding JSON spec is described here. data Audio Audio :: URL -> Integer -> Audio [getAudioURL] :: Audio -> URL [getAudioDuration] :: Audio -> Integer -- | Messageable for location data. -- -- It contains a title, address, and geographic coordination of a -- location. Its corresponding JSON spec is described here. -- -- This type is also used to decode location event message from webhook -- request. About the webhook usage, please refer to EventMessage -- in Line.Messaging.Webhook.Types. data Location Location :: Text -> Text -> Double -> Double -> Location [getLocationTitle] :: Location -> Text [getAddress] :: Location -> Text [getLatitude] :: Location -> Double [getLongitude] :: Location -> Double -- | Messageable for sticker data. -- -- It contains its package and sticker ID. Its corresponding JSON spec is -- described here. -- -- This type is also used to decode sticker event message from webhook -- request. About the webhook usage, please refer to EventMessage -- in Line.Messaging.Webhook.Types. data Sticker Sticker :: ID -> ID -> Sticker [getPackageID] :: Sticker -> ID [getStickerID] :: Sticker -> ID -- | Messageable for image map data. -- -- About how to send an image map message and what each field means, -- please refer to image map message spec. data ImageMap ImageMap :: URL -> Text -> (Integer, Integer) -> [ImageMapAction] -> ImageMap -- | Base URL of images [getBaseImageURL] :: ImageMap -> URL -- | Alt text for devices not supporting image map [getIMAltText] :: ImageMap -> Text -- | Image size tuple, (width, height) specifically. The width to be set to -- 1040, the height to be set to the value corresponding to a width of -- 1040. [getBaseImageSize] :: ImageMap -> (Integer, Integer) -- | Actions to be executed when each area is tapped [getIMActions] :: ImageMap -> [ImageMapAction] -- | A type representing actions when a specific area of an image map is -- tapped. -- -- It contains action data and area information. data ImageMapAction -- | Open a web page when an area is tapped. IMURIAction :: URL -> ImageMapArea -> ImageMapAction -- | Send a text message from the user who tapped an area. IMMessageAction :: Text -> ImageMapArea -> ImageMapAction -- | A type representing a tappable area in an image map -- -- Each component means (x, y, width, height) correspondingly. type ImageMapArea = (Integer, Integer, Integer, Integer) -- | Messageable for template data. -- -- It has a type parameter t which means a template content -- type. The type is polymolphic, but Messageable instances are -- defined only for Buttons, Confirm, and Carousel. -- -- About how to send template message and what each field means, please -- refer to template message spec. data Template t Template :: Text -> t -> Template t -- | Alt text for devices not supporting template message [getTemplateAltText] :: Template t -> Text -- | Template content type [getTemplate] :: Template t -> t -- | The buttons content type for template message. -- -- -- For more details of each field, please refer to the Buttons -- section in the LINE documentation. data Buttons Buttons :: Maybe URL -> Maybe Text -> Text -> [TemplateAction] -> Buttons -- | URL for thumbnail image [getButtonsThumbnailURL] :: Buttons -> Maybe URL -- | Title text [getButtonsTitle] :: Buttons -> Maybe Text -- | Description text [getButtonsText] :: Buttons -> Text -- | A list of template actions, each of which represents a button (max: 4) [getButtonsActions] :: Buttons -> [TemplateAction] -- | The confirm content type for template message. -- -- -- For more details of each field, please refer to the Confirm -- section in the LINE documentation. data Confirm Confirm :: Text -> [TemplateAction] -> Confirm -- | Confirm text [getConfirmText] :: Confirm -> Text -- | A list of template actions, each of which represents a button (max: 2) [getConfirmActions] :: Confirm -> [TemplateAction] -- | The carousel content type for template message. -- -- -- For more details of each field, please refer to the Carousel -- section in the LINE documentation. data Carousel Carousel :: [Column] -> Carousel -- | A list of columns for a carousel template [getColumns] :: Carousel -> [Column] -- | Actual contents of carousel template. -- -- It has the same fields as Buttons, except that the number of -- actions is up to 3. data Column Column :: Maybe URL -> Maybe Text -> Text -> [TemplateAction] -> Column -- | URL for thumbnail image [getColumnThumbnailURL] :: Column -> Maybe URL -- | Title text [getColumnTitle] :: Column -> Maybe Text -- | Description text [getColumnText] :: Column -> Text -- | A list of template actions, each of which represents a button (max: 3) [getColumnActions] :: Column -> [TemplateAction] -- | Just a type alias for Text, used with TemplateAction. type Label = Text -- | A data type for possible template actions. -- -- Each action object represents a button in template message. A button -- has a label and an actual action fired by click. data TemplateAction -- | Message action. When clicked, a specified text will be sent into the -- same room by a user who clicked the button. TplMessageAction :: Label -> Text -> TemplateAction -- | Postback action. When clicked, a specified text will be sent, and -- postback data will be sent to webhook server as a postback event. TplPostbackAction :: Label -> Postback -> (Maybe Text) -> TemplateAction -- | URI action. When clicked, a web page with a specified URI will open in -- the in-app browser. TplURIAction :: Label -> URL -> TemplateAction -- | A type to represent a user's profile. -- -- It is the return type of the getProfile API in the -- Line.Messaging.API module. data Profile Profile :: ID -> Text -> Maybe URL -> Maybe Text -> Profile [getUserID] :: Profile -> ID [getDisplayName] :: Profile -> Text [getPictureURL] :: Profile -> Maybe URL [getStatusMessage] :: Profile -> Maybe Text -- | An error type possibly returned from the APIIO type. -- -- State code errors may contain a parsed error body. Other types of -- errors, which may rarely occur if used properly, does not. -- -- For more details of error types, please refer to Status codes -- and Error response sections in the LINE documentation. data APIError -- | 400 Bad Request with a parsed error body, caused by badly formatted -- request. BadRequest :: (Maybe APIErrorBody) -> APIError -- | 401 Unauthorized with a parsed error body, caused by invalid access -- token. Unauthorized :: (Maybe APIErrorBody) -> APIError -- | 403 Forbidden with a parsed error body, caused by unauthorized account -- or plan. Forbidden :: (Maybe APIErrorBody) -> APIError -- | 429 Too Many Requests with a parsed error body, caused by exceeding -- the rate limit. TooManyRequests :: (Maybe APIErrorBody) -> APIError -- | 500 Internal Server Error with a parsed error body. InternalServerError :: (Maybe APIErrorBody) -> APIError -- | Caused by status codes other than 200 and listed statuses above, with -- the status code and request body. UndefinedStatusCode :: Int -> ByteString -> APIError -- | Caused by badly formatted response body from APIs. JSONDecodeError :: String -> APIError -- | Any other exception caught as SomeException. UndefinedError :: SomeException -> APIError -- | An error body type. -- -- It contains error message, and may contain property information and -- detailed error bodies. data APIErrorBody APIErrorBody :: Text -> Maybe Text -> Maybe [APIErrorBody] -> APIErrorBody [getErrorMessage] :: APIErrorBody -> Text [getErrorProperty] :: APIErrorBody -> Maybe Text [getErrorDetails] :: APIErrorBody -> Maybe [APIErrorBody] instance GHC.Show.Show Line.Messaging.API.Types.APIError instance GHC.Show.Show Line.Messaging.API.Types.APIErrorBody instance GHC.Classes.Eq Line.Messaging.API.Types.APIErrorBody instance GHC.Show.Show Line.Messaging.API.Types.Profile instance GHC.Classes.Eq Line.Messaging.API.Types.Profile instance GHC.Show.Show Line.Messaging.API.Types.Buttons instance GHC.Classes.Eq Line.Messaging.API.Types.Buttons instance GHC.Show.Show Line.Messaging.API.Types.Confirm instance GHC.Classes.Eq Line.Messaging.API.Types.Confirm instance GHC.Show.Show Line.Messaging.API.Types.Carousel instance GHC.Classes.Eq Line.Messaging.API.Types.Carousel instance GHC.Show.Show Line.Messaging.API.Types.Column instance GHC.Classes.Eq Line.Messaging.API.Types.Column instance GHC.Show.Show Line.Messaging.API.Types.TemplateAction instance GHC.Classes.Eq Line.Messaging.API.Types.TemplateAction instance GHC.Show.Show t => GHC.Show.Show (Line.Messaging.API.Types.Template t) instance GHC.Classes.Eq t => GHC.Classes.Eq (Line.Messaging.API.Types.Template t) instance GHC.Show.Show Line.Messaging.API.Types.ImageMap instance GHC.Classes.Eq Line.Messaging.API.Types.ImageMap instance GHC.Show.Show Line.Messaging.API.Types.ImageMapAction instance GHC.Classes.Eq Line.Messaging.API.Types.ImageMapAction instance GHC.Show.Show Line.Messaging.API.Types.Sticker instance GHC.Classes.Eq Line.Messaging.API.Types.Sticker instance GHC.Show.Show Line.Messaging.API.Types.Location instance GHC.Classes.Eq Line.Messaging.API.Types.Location instance GHC.Show.Show Line.Messaging.API.Types.Audio instance GHC.Classes.Eq Line.Messaging.API.Types.Audio instance GHC.Show.Show Line.Messaging.API.Types.Video instance GHC.Classes.Eq Line.Messaging.API.Types.Video instance GHC.Show.Show Line.Messaging.API.Types.Image instance GHC.Classes.Eq Line.Messaging.API.Types.Image instance GHC.Show.Show Line.Messaging.API.Types.Text instance GHC.Classes.Ord Line.Messaging.API.Types.Text instance GHC.Classes.Eq Line.Messaging.API.Types.Text instance GHC.Show.Show Line.Messaging.API.Types.Message instance Data.Aeson.Types.ToJSON.ToJSON Line.Messaging.API.Types.Message instance Data.Aeson.Types.FromJSON.FromJSON Line.Messaging.API.Types.Text instance Line.Messaging.API.Types.Messageable Line.Messaging.API.Types.Text instance Line.Messaging.API.Types.Messageable Line.Messaging.API.Types.Image instance Line.Messaging.API.Types.Messageable Line.Messaging.API.Types.Video instance Line.Messaging.API.Types.Messageable Line.Messaging.API.Types.Audio instance Data.Aeson.Types.FromJSON.FromJSON Line.Messaging.API.Types.Location instance Line.Messaging.API.Types.Messageable Line.Messaging.API.Types.Location instance Data.Aeson.Types.FromJSON.FromJSON Line.Messaging.API.Types.Sticker instance Line.Messaging.API.Types.Messageable Line.Messaging.API.Types.Sticker instance Line.Messaging.API.Types.Messageable Line.Messaging.API.Types.ImageMap instance Data.Aeson.Types.ToJSON.ToJSON Line.Messaging.API.Types.ImageMapAction instance Line.Messaging.API.Types.Messageable (Line.Messaging.API.Types.Template Line.Messaging.API.Types.Buttons) instance Line.Messaging.API.Types.Messageable (Line.Messaging.API.Types.Template Line.Messaging.API.Types.Confirm) instance Line.Messaging.API.Types.Messageable (Line.Messaging.API.Types.Template Line.Messaging.API.Types.Carousel) instance Data.Aeson.Types.ToJSON.ToJSON Line.Messaging.API.Types.Buttons instance Data.Aeson.Types.ToJSON.ToJSON Line.Messaging.API.Types.Confirm instance Data.Aeson.Types.ToJSON.ToJSON Line.Messaging.API.Types.Carousel instance Data.Aeson.Types.ToJSON.ToJSON Line.Messaging.API.Types.Column instance Data.Aeson.Types.ToJSON.ToJSON Line.Messaging.API.Types.TemplateAction instance Data.Aeson.Types.FromJSON.FromJSON Line.Messaging.API.Types.Profile instance Data.Aeson.Types.FromJSON.FromJSON Line.Messaging.API.Types.APIErrorBody -- | This module provides types to be used with -- Line.Messaging.Webhook. module Line.Messaging.Webhook.Types -- | A type alias for auth signature. -- -- It is set as X-Line-Signature header in webhook requests type Signature = ByteString -- | A failure type returned when a webhook request is malformed. data WebhookFailure -- | When the signature is not valid. SignatureVerificationFailed :: WebhookFailure -- | When the request body cannot be decoded into defined event types. MessageDecodeFailed :: WebhookFailure -- | This type represents a whole request body. -- -- It is mainly for JSON parsing, and users may not need to use this type -- directly. newtype Body Body :: [Event] -> Body -- | A type to represent each webhook event. The type of an event can be -- determined with pattern matching. -- --
--   handleEvent :: Event -> IO ()
--   handleEvent (MessageEvent event) = handleMessageEvent event
--   handleEvent (BeaconEvent event) = handleBeaconEvent event
--   handleEvent _ = return ()
--   
--   handleMessageEvent :: ReplyableEvent EventMessage -> IO ()
--   handleMessageEvent = undefined
--   
--   handleBeaconEvent :: ReplyableEvent BeaconData -> IO ()
--   handleBeaconEvent = undefined
--   
-- -- All the data contstructors have a type EventTuple r a -> -- Event. data Event MessageEvent :: (ReplyableEvent EventMessage) -> Event FollowEvent :: (ReplyableEvent ()) -> Event UnfollowEvent :: (NonReplyableEvent ()) -> Event JoinEvent :: (ReplyableEvent ()) -> Event LeaveEvent :: (NonReplyableEvent ()) -> Event PostbackEvent :: (ReplyableEvent Postback) -> Event BeaconEvent :: (ReplyableEvent BeaconData) -> Event -- | The base type for an event. It is a type alias for 4-tuple containing -- event data. -- -- The type variable r is for a reply token, which is -- () in the case of non-replyable events. The type variable -- a is a content type, which is () for events without -- content. type EventTuple r a = (EventSource, UTCTime, r, a) -- | A type alias for reply token. It is also consumed by the -- reply API. type ReplyToken = Text -- | A type alias to represent a replyable event. type ReplyableEvent a = EventTuple ReplyToken a -- | A type alias to represent a non-replyable event. type NonReplyableEvent a = EventTuple () a -- | Retrieve event source from an event. getSource :: EventTuple r a -> EventSource -- | Retrieve datetime when event is sent. getDatetime :: EventTuple r a -> UTCTime -- | Retrieve a reply token of an event. It can be used only for -- ReplyableEvent. getReplyToken :: ReplyableEvent a -> ReplyToken -- | Retrieve event message from an event. It can be used only for events -- whose content is a message. -- --
--   handleMessageEvent :: ReplyableEvent EventMessage -> IO ()
--   handleMessageEvent event = do
--     let message = getMessage event
--     print message
--   
getMessage :: ReplyableEvent EventMessage -> EventMessage -- | Retrieve postback data from an event. It can be used only for events -- whose content is postback data. -- --
--   import qualified Data.Text.IO as TIO
--   
--   handlePostbackEvent :: ReplyableEvent Postback -> IO ()
--   handlePostbackEvent event = do
--     let postback = getPostback event
--     TIO.putStrLn postback
--   
getPostback :: ReplyableEvent Postback -> Postback -- | Retrieve beacon data from an event. It can be used only for events -- whose content is beacon data. -- --
--   handleBeaconEvent :: ReplyableEvent BeaconData -> IO ()
--   handleBeaconEvent event = do
--     let beaconData = getBeacon event
--     print beaconData
--   
getBeacon :: ReplyableEvent BeaconData -> BeaconData -- | A source from which an event is sent. It can be retrieved from events -- with getSource. data EventSource User :: ID -> EventSource Group :: ID -> EventSource Room :: ID -> EventSource -- | Retrieve identifier from event source getID :: EventSource -> ID -- | Represent message types sent with MessageEvent. It can be -- retrieved from message events with getMessage. -- -- There is no actual content body sent with image, video and audio -- messages. It should be manually downloaded via the -- getContent API. -- -- For more details of event messages, please refer to the Message -- event section of the LINE documentation. data EventMessage -- | Text event message. TextEM :: ID -> Text -> EventMessage -- | Image event message. ImageEM :: ID -> EventMessage -- | Video event message. VideoEM :: ID -> EventMessage -- | Audio event message. AudioEM :: ID -> EventMessage -- | Location event message. LocationEM :: ID -> Location -> EventMessage -- | Sticker event message. StickerEM :: ID -> Sticker -> EventMessage -- | Represent beacon data. data BeaconData BeaconEnter :: ID -> (Maybe String) -> BeaconData BeaconLeave :: ID -> (Maybe String) -> BeaconData BeaconBanner :: ID -> (Maybe String) -> BeaconData -- | Get hardware ID of the beacon. getHWID :: BeaconData -> ID -- | Get device message from the beacon, if exists. getDeviceMessage :: BeaconData -> Maybe String instance GHC.Show.Show Line.Messaging.Webhook.Types.Body instance GHC.Classes.Eq Line.Messaging.Webhook.Types.Body instance GHC.Show.Show Line.Messaging.Webhook.Types.Event instance GHC.Classes.Eq Line.Messaging.Webhook.Types.Event instance GHC.Show.Show Line.Messaging.Webhook.Types.BeaconData instance GHC.Classes.Eq Line.Messaging.Webhook.Types.BeaconData instance GHC.Show.Show Line.Messaging.Webhook.Types.EventMessage instance GHC.Classes.Eq Line.Messaging.Webhook.Types.EventMessage instance GHC.Show.Show Line.Messaging.Webhook.Types.EventSource instance GHC.Classes.Eq Line.Messaging.Webhook.Types.EventSource instance GHC.Show.Show Line.Messaging.Webhook.Types.WebhookFailure instance GHC.Classes.Eq Line.Messaging.Webhook.Types.WebhookFailure instance Data.Aeson.Types.FromJSON.FromJSON Line.Messaging.Webhook.Types.Body instance Data.Aeson.Types.FromJSON.FromJSON Line.Messaging.Webhook.Types.Event instance Data.Aeson.Types.FromJSON.FromJSON Line.Messaging.Webhook.Types.EventSource instance Data.Aeson.Types.FromJSON.FromJSON Line.Messaging.Webhook.Types.EventMessage instance Data.Aeson.Types.FromJSON.FromJSON Line.Messaging.Webhook.Types.BeaconData -- | This module just re-exports other Types modules. module Line.Messaging.Types -- | This module provides a function to check if a webhook request has a -- correct signature. module Line.Messaging.Webhook.Validation -- | Provided a channel secret, request body and auth signature, it -- determines the request is properly signatured, which probably means it -- is sent from a valid LINE server. -- -- For more details of webhook authentication, please refer to the -- LINE documentation. validateSignature :: ChannelSecret -> ByteString -> Signature -> Bool -- | This module provides webhook handlers both general and WAI-specific. module Line.Messaging.Webhook -- | A basic webhook function. It validates a request with a channel -- secret, signature and body, and parses the body into a list of webhook -- events. -- -- To handle failures, the result is in the form of ExceptT -- WebhookFailure. webhook :: (Monad m) => ChannelSecret -> ByteString -> Signature -> ExceptT WebhookFailure m [Event] -- | A webhook handler for WAI. It uses webhook internally and -- returns a WAI Application. -- -- An example webhook server using WAI will be like below: -- --
--   app :: Application
--   app req f = case pathInfo req of
--     "webhook" : _ -> do
--       secret <- getChannelSecret
--       webhookApp secret handler defaultOnFailure req f
--     _ -> undefined
--   
--   handler :: [Event] -> IO ()
--   handler events = forM_ events handleEvent
--   
--   handleEvent :: Event -> IO ()
--   handleEvent (MessageEvent event) = undefined -- handle a message event
--   handleEvent _ = return ()
--   
webhookApp :: ChannelSecret -> ([Event] -> IO ()) -> (WebhookFailure -> Application) -> Application -- | A basic error handler to be used with webhookApp. It returns -- 400 Bad Request with the WebhookFailure code for its body. defaultOnFailure :: WebhookFailure -> Application -- | A webhook handler for Scotty. It uses webhook internally and -- returns a Scotty action of type ActionM () -- -- An example webhook server using WAI will be like below: -- --
--   main :: IO ()
--   main = scotty 3000 $ do
--     post "/webhook" $ webhookAction handler defaultOnFailure'
--   
--   handler :: [Event] -> IO ()
--   handler events = forM_ events handleEvent
--   
--   handleEvent :: Event -> IO ()
--   handleEvent (MessageEvent event) = undefined -- handle a message event
--   handleEvent _ = return ()
--   
webhookAction :: ChannelSecret -> ([Event] -> IO ()) -> (WebhookFailure -> ActionM ()) -> ActionM () -- | A basic error handler to be used with webhookAction. It returns -- 400 Bad Request with the WebhookFailure code for its body. It -- has the same purpose as defaultOnFailure, except that it is for -- Scotty. defaultOnFailure' :: WebhookFailure -> ActionM () -- | This module provides functions corresponding to the LINE Messaging -- APIs, nearly one on one. -- -- For more details about the APIs themselves, please refer to the API -- references. module Line.Messaging.API -- | A monad transformer for API calls. If translated into a human-readable -- form, it means: -- --
    --
  1. An API call needs a channel access token to specify through which -- channel it should send the call (ReaderT -- ChannelAccessToken).
  2. --
  3. An API call effectfully returns a result if successful, -- APIError otherwise (ExceptT -- APIError).
  4. --
type APIIO a = ReaderT ChannelAccessToken (ExceptT APIError IO) a -- | runAPI resolves the APIIO monad transformer, and turns -- it into a plain IO with -- ChannelAccessToken provided. -- -- The reason the type of the first parameter is not -- ChannelAccessToken, but IO -- ChannelAccessToken, is that it is usually loaded via -- effectful actions such as parsing command line arguments or reading a -- config file. -- -- An example usage is like below: -- --
--   api :: APIIO a -> IO (Either APIError a)
--   api = runAPI getChannelAccessTokenFromConfig
--   
--   main :: IO ()
--   main = do
--     result <- api $ push "some_receiver_id" [ Message $ Text "Hello, world!" ]
--     case result of
--       Right _ -> return ()
--       Left err -> print err
--   
runAPI :: IO ChannelAccessToken -> APIIO a -> IO (Either APIError a) -- | Push messages into a receiver. The receiver can be a user, a room or a -- group, specified by ID. -- -- A Message represents a message object. For types of the message -- object, please refer to the Send message object section of the -- LINE documentation. -- -- An example usage of Message is like below: -- --
--   messages :: [Message]
--   messages = [ Message $ Image imageURL previewURL
--              , Message $ Text "hello, world!"
--              , Message $ Template "an example template"
--                  Confirm "a confirm template"
--                    [ TplMessageAction "ok label" "print this"
--                    , TplURIAction "link label" linkURL
--                    ]
--              ]
--   
-- -- For more information about the API, please refer to the API -- reference. push :: ID -> [Message] -> APIIO () -- | Send messages to multiple users at any time. -- -- Messages cannot be sent to groups or rooms. -- -- For more information, please refer to its API reference. multicast :: [ID] -> [Message] -> APIIO () -- | Send messages as a reply to specific webhook event. -- -- It works similarly to how push does for messages, except that -- it can only reply through a specific reply token. The token can be -- obtained from replyable events on a webhook server. -- -- For more information, please refer to its API reference. reply :: ReplyToken -> [Message] -> APIIO () -- | Get content body of images, videos and audios sent with event -- messages, specified by ID. -- -- In the event messages, the content body is not included. Users should -- use getContent to downloaded the content only when it is really -- needed. -- -- For more information, please refer to its API reference. getContent :: ID -> APIIO ByteString -- | Get a profile of a user, specified by ID. -- -- The user identifier can be obtained via EventSource. -- -- For more information, please refer to its API reference. getProfile :: ID -> APIIO Profile -- | Leave a room, specified by ID. -- -- For more information, please refer to its API reference. leaveRoom :: ID -> APIIO () -- | Leave a group, specified by ID. -- -- For more information, please refer to its API reference. leaveGroup :: ID -> APIIO ()