Skip to content

Commit

Permalink
Release 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
darkfrog26 committed May 17, 2023
1 parent c588b65 commit e54d33b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ val scala213 = "2.13.10"

name := "sendgrid4s"
organization := "com.outr"
version := "1.0.5"
version := "1.0.6"

scalaVersion := scala213
crossScalaVersions := List(scala3, scala213)
Expand Down Expand Up @@ -35,5 +35,5 @@ outputStrategy := Some(StdoutOutput)
fork := true

libraryDependencies ++= Seq(
"com.outr" %% "spice-client-okhttp" % "0.0.30"
"com.outr" %% "spice-client-okhttp" % "0.0.31"
)
5 changes: 4 additions & 1 deletion src/main/scala/sendgrid/Sendgrid.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ import fabric._
import fabric.filter.RemoveEmptyFilter
import fabric.io.JsonParser
import fabric.rw._
import spice.http.client.HttpClient
import spice.http.client.{HttpClient, RetryManager}
import spice.net._

import scala.concurrent.duration.DurationInt

case class Sendgrid(apiKey: String) {
private lazy val client = HttpClient
.url(url"https://api.sendgrid.com/v3/mail/send")
.header("Authorization", s"Bearer $apiKey")
.retryManager(RetryManager.simple(5, 5.seconds))

def send(message: Message): IO[Option[String]] = client
.post
Expand Down

0 comments on commit e54d33b

Please sign in to comment.