All Projects → moleike → line-bot-sdk

moleike / line-bot-sdk

Licence: BSD-3-Clause license
🍥 Haskell向けLINE Messaging API SDK

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to line-bot-sdk

Linebot
🤖 SDK for the LINE Messaging API for Node.js
Stars: ✭ 184 (+493.55%)
Mutual labels:  line
react-native-d3multiline-chart
Animated Android and iOS multiline/line/scatterPoint chart based on d3.js 🤘😎🤘
Stars: ✭ 43 (+38.71%)
Mutual labels:  line
linezx
Way line be with me?
Stars: ✭ 12 (-61.29%)
Mutual labels:  line
Line Py
LINE Messaging's private API
Stars: ✭ 212 (+583.87%)
Mutual labels:  line
Lcnn
LCNN: End-to-End Wireframe Parsing
Stars: ✭ 234 (+654.84%)
Mutual labels:  line
jsline-api
[Deprecated] Unofficial Naver Line API for JS
Stars: ✭ 14 (-54.84%)
Mutual labels:  line
Telegram link line
用Telegram來收發Line的訊息,use telegram to Send and receive messages(from Line)。 或者把它當作Line的訊息備份也是可啦 😛
Stars: ✭ 164 (+429.03%)
Mutual labels:  line
LINE-FreshBot
LINE Bot
Stars: ✭ 23 (-25.81%)
Mutual labels:  line
Laue
🖖📈 Modern charts for Vue 2.0
Stars: ✭ 245 (+690.32%)
Mutual labels:  line
gcf-line-devbot
LINE Flex 開發人員工具
Stars: ✭ 32 (+3.23%)
Mutual labels:  line
Kld Intersections
A library of intersection algorithms covering all SVG shape types
Stars: ✭ 214 (+590.32%)
Mutual labels:  line
Jh flutter demo
a flutter demo
Stars: ✭ 229 (+638.71%)
Mutual labels:  line
atom-inline-blame
Atom package to display blame inline
Stars: ✭ 23 (-25.81%)
Mutual labels:  line
L7
🌎 Large-scale WebGL-powered Geospatial Data Visualization analysis framework which relies on Mapbox GL or AMap to render basemaps.
Stars: ✭ 2,517 (+8019.35%)
Mutual labels:  line
LineTimeline
Line Timeline API
Stars: ✭ 12 (-61.29%)
Mutual labels:  line
Line Bot Tutorial
Line bot tutorial.
Stars: ✭ 181 (+483.87%)
Mutual labels:  line
hackernews
📰 HackerNews API
Stars: ✭ 40 (+29.03%)
Mutual labels:  servant
line
Development repository for the line cookbook
Stars: ✭ 96 (+209.68%)
Mutual labels:  line
ghe-line-notify
LINE Notify Gateway for Github Enterprise.
Stars: ✭ 19 (-38.71%)
Mutual labels:  line
haskell-realworld-example
A Haskell implementation of realworld.io
Stars: ✭ 39 (+25.81%)
Mutual labels:  servant

line-bot-sdk Build Actions

Servant library for building LINE chatbots.

Features:

  • Servant combinator LineReqBody for validation of request signatures using the channel secret. This is required to distinguish legitimate requests sent by LINE from malicious requests

  • Bindings for (most of) the Messaging APIs

Installation

From Hackage

line-bot-sdk is available on Hackage. Using the cabal-install tool:

cabal update
cabal install line-bot-sdk

From source

Building from source can be done using stack or cabal:

git clone github.com/moleike/line-bot-sdk.git
cd line-bot-sdk
stack install # Alternatively, `cabal install`

Documentation

See the official API documentation for more information.

Usage

{-# LANGUAGE DataKinds         #-}
{-# LANGUAGE OverloadedStrings #-}

import           Data.String        (fromString)
import           Line.Bot.Client
import           Line.Bot.Types
import           System.Environment (getEnv)

getProfiles :: Id Room -> Line [Profile]
getProfiles roomId = do
  userIds <- getRoomMemberUserIds roomId
  sequence $ getRoomMemberProfile roomId <$> userIds

main = do
  token  <- fromString <$> getEnv "CHANNEL_TOKEN"
  result <- runLine (getProfiles "U4af4980629...") token
  case result of
    Left err      -> print err
    Right profile -> print profile

See the examples/ directory for more comprehensive examples.

Contribute

Please report bugs via the github issue tracker.

Acknowledgments

Thanks to the authors of servant-github, for inspiration.

License

See LICENSE.

Copyright © 2019–present Alexandre Moreno

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].