From b59910c793bcfe9eb155bd13a7a87a06b5e76a4f Mon Sep 17 00:00:00 2001 From: Dylan Shine Date: Sat, 6 Aug 2022 13:44:45 -0600 Subject: [PATCH 1/3] Update README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e8d21c8..5eb45c3 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Add the dependency to Package.swift: ~~~~swift dependencies: [ ... - .package(url: "https://github.com/vapor-community/sendgrid-kit.git", from: "1.0.0") + .package(url: "https://github.com/vapor-community/sendgrid-kit.git", from: "2.0.0") ], targets: [ .target(name: "App", dependencies: [ @@ -22,7 +22,7 @@ Register the config and the provider. ~~~~swift let httpClient = HTTPClient(...) -let sendgridClient = SendGridClient(httpClient: httpClient, apiKey: "YOUR_API_KEY") +let sendGridClient = SendGridClient(httpClient: httpClient, apiKey: "YOUR_API_KEY") ~~~~ ## Using the API @@ -34,7 +34,7 @@ Usage in a route closure would be as followed: import SendGrid let email = SendGridEmail(...) -try sendGridClient.send(email, on: eventLoop) +try await sendGridClient.send(email) ~~~~ ## Error handling @@ -43,7 +43,7 @@ Simply ensure you catch errors thrown like any other throwing function ~~~~swift do { - try sendGridClient.send(...) + try await sendGridClient.send(...) } catch let error as SendGridError { print(error) From 65ce671d9580458e906e644c608a76e2373c1f72 Mon Sep 17 00:00:00 2001 From: Dylan Shine Date: Sat, 6 Aug 2022 20:28:16 -0600 Subject: [PATCH 2/3] Update swift --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 423cfe7..fc291f1 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.5 +// swift-tools-version:5.6 import PackageDescription let package = Package( From 84836adbc740ce2b2cccb1497f8b9e3d2643bb56 Mon Sep 17 00:00:00 2001 From: Andrew Edwards Date: Sun, 7 Aug 2022 11:59:06 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5eb45c3..146e7f7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SendGridKit -![Swift](http://img.shields.io/badge/swift-5.2-brightgreen.svg) +![Swift](http://img.shields.io/badge/swift-5.6-brightgreen.svg) SendGridKit is a Swift package used to communicate with the SendGrid API for Server Side Swift Apps.