Skip to content

acyed/twilio-haskell

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twilio

twilio on Hackage twilio-haskell on Travis CI

This package provides a library for interacting with Twilio's API. Install using

$ cabal install twilio

Documentation soon to be available on Hackage. For now, see markandrus.github.io/twilio-haskell.

For TwiML, see twiml-haskell.

Example

You 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"
  message <- post body
  liftIO $ print message

Contributing

Feel free to contribute to any of the open [issues] (https://github.com/markandrus/twilio-haskell/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 AUTHORS file.

About

Twilio library for Haskell

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Haskell 99.2%
  • Shell 0.8%