twilio4s is a wrapper over the Twilio REST API.
twilio4s lets you create requests using case classes and binds JSON response to the Twilio object models.
- akka-http for making HTTP requests
- scala-xml for parsing XML responses where applicable
- akka-stream-json for streaming JSON
- circe for JSON parsing, validation and compile-time macros
- enumeratum for providing typesafe enumerations on twilio enum models
- scala-logging for convenient logging with
logback-classic
as backend - scalatest for unit and integration tests
Currently, twilio4s is in initial development stage. I am focusing on programmable voice but pull requests to other modules are always welcomed!
- JDK 8
- Scala 2.11.+ or 2.12.+
- Signup for free and obtain your
ACCOUNT SID
,AUTH TOKEN
and atrial phone number
Setup your ACCOUNT SID
and AUTH TOKEN
:
- Either via environment variables:
export TWILIO_ACCOUNT_SID='my-account-sid'
export TWILIO_AUTH_TOKEN='my-auth-token'
(or)
- Use
application.conf
twilio {
rest {
auth {
account.sid="my-account-sid"
token="my-auth-token"
}
}
}
There is currently an integration test that show how the library is intended to be used.
The project uses scalafmt
to enforce consistent Scala formatting.
Please run scalafmt
inside of sbt before committing your code to Github.
Tests can be run with:
sbt test
sbt it:test