Minimal Scala API for Mandrill
Mandrill is a transactional email API for MailChimp users. This library provides a API models and json (de)serializers.
Goals
There is already a scala library scamandrill. While this library as a lot more API models implemented it takes a more opinionated approach.
Scala Mandrill
provides
- Generic API models and provides parsers for different json libs. You choose.
- No Mandrill Email Client. It’s up to the user which http library to use
In addition the API models are incomplete. We’ll add more as the library evolves.
Features
core
provides API models and helpers to create themplay-json
provides jsonReads
andWrites
instances for all modelstest-kit
provides scalacheck generators and arbitraries for all API models
Supported APIs
Usage
Mandrill API request bodies are constructed via a fluent interface.
import net.gutefrage.mandrill._
import net.gutefrage.mandrill.core._
val apiKey = MandrillApiKey("your-api-key")
val sendTemplateBody = Mandrill(apiKey)
.messages
.sendTemplate("my-template-slug")
.to("foo@bar.com")
For more information read the documentation
Acknowledgement
- Mandrill for a great API documentation
- Scamandrill as a source of inspiration
- Scala Cats for a great documentation and inspiration for a scala library build setup