Skip to content

vaedama/twilio4s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twilio4s, an asychronous non-blocking Scala Twilio Client.

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.

Libraries used:

  • 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!

Prerequisites

  • JDK 8
  • Scala 2.11.+ or 2.12.+
  • Signup for free and obtain your ACCOUNT SID, AUTH TOKEN and a trial phone number

Usage

Setup your ACCOUNT SID and AUTH TOKEN:

  1. Either via environment variables:
export TWILIO_ACCOUNT_SID='my-account-sid'
export TWILIO_AUTH_TOKEN='my-auth-token'

(or)

  1. Use application.conf
twilio {
  rest {
    auth {
      account.sid="my-account-sid"
      token="my-auth-token"
    }
  }
}

Examples

There is currently an integration test that show how the library is intended to be used.

Formatting/Style Guide

The project uses scalafmt to enforce consistent Scala formatting. Please run scalafmt inside of sbt before committing your code to Github.

Testing

Tests can be run with:

sbt test
sbt it:test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages