在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):markandrus/twilio-haskell开源软件地址(OpenSource Url):https://github.com/markandrus/twilio-haskell开源编程语言(OpenSource Language):Haskell 99.4%开源软件介绍(OpenSource Introduction):twilioThis package provides a library for interacting with Twilio's API. Install using
Documentation is available through GitHub (for HEAD) or Hackage for the current and preceding releases. For TwiML, see twiml-haskell. ExampleYou can create a REST API client and fetch the calls resources as follows {-#LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad.IO.Class (liftIO)
import System.Environment (getEnv)
import Twilio
import Twilio.Calls as Calls
import Twilio.Messages
main :: IO ()
main = runTwilio' (getEnv "ACCOUNT_SID")
(getEnv "AUTH_TOKEN") $ do
-- Print Calls.
calls <- Calls.get
liftIO $ print calls
-- Send a Message.
let body = PostMessage "+14158059869" "+14158059869" "Oh, hai" Nothing
message <- post body
liftIO $ print message TestingCurrently, our test suite makes calls to Twilio's API. This means that you will be unable to test without a Twilio account. To test on your local machine, set the environment variables The easiest way to provision a compatible phone number is to use the Twilio Website to buy a number, with Voice / SMS / MMS capabilities. ContributingFeel free to contribute to any of the open issues, bugfixes, etc. When you think you're ready to merge, ensure the tests are passing and open a pull request. If you are adding new functionality, please include new tests as well. Finally, add yourself to the |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论