Skip to content

Commit 408e259

Browse files
authored
Merge pull request #12 from dylanshine/master
Update README
2 parents 4fa5c75 + 84836ad commit 408e259

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.5
1+
// swift-tools-version:5.6
22
import PackageDescription
33

44
let package = Package(

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SendGridKit
22

3-
![Swift](http://img.shields.io/badge/swift-5.2-brightgreen.svg)
3+
![Swift](http://img.shields.io/badge/swift-5.6-brightgreen.svg)
44

55
SendGridKit is a Swift package used to communicate with the SendGrid API for Server Side Swift Apps.
66

@@ -10,7 +10,7 @@ Add the dependency to Package.swift:
1010
~~~~swift
1111
dependencies: [
1212
...
13-
.package(url: "https://github.com/vapor-community/sendgrid-kit.git", from: "1.0.0")
13+
.package(url: "https://github.com/vapor-community/sendgrid-kit.git", from: "2.0.0")
1414
],
1515
targets: [
1616
.target(name: "App", dependencies: [
@@ -22,7 +22,7 @@ Register the config and the provider.
2222

2323
~~~~swift
2424
let httpClient = HTTPClient(...)
25-
let sendgridClient = SendGridClient(httpClient: httpClient, apiKey: "YOUR_API_KEY")
25+
let sendGridClient = SendGridClient(httpClient: httpClient, apiKey: "YOUR_API_KEY")
2626
~~~~
2727

2828
## Using the API
@@ -34,7 +34,7 @@ Usage in a route closure would be as followed:
3434
import SendGrid
3535

3636
let email = SendGridEmail(...)
37-
try sendGridClient.send(email, on: eventLoop)
37+
try await sendGridClient.send(email)
3838
~~~~
3939

4040
## Error handling
@@ -43,7 +43,7 @@ Simply ensure you catch errors thrown like any other throwing function
4343

4444
~~~~swift
4545
do {
46-
try sendGridClient.send(...)
46+
try await sendGridClient.send(...)
4747
}
4848
catch let error as SendGridError {
4949
print(error)

0 commit comments

Comments
 (0)