Skip to content

Commit

Permalink
Small doc update (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
pinarol authored Jun 7, 2024
1 parent b1efe68 commit f95c3a3
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Sources/Gravatar/Gravatar.docc/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ import Gravatar

// [...]

avatarImageView.gravatar.setImage(email: "[email protected]") { result in
switch result {
case .success(let result):
print("The image view is already displaying the avatar! 🎉")
case .failure(let error):
print(error)
}
let avatarImageView = UIImageView()

do {
try await avatarImageView.gravatar.setImage(
avatarID: .email("[email protected]")
)
} catch {
print(error)
}
```

Expand All @@ -84,8 +85,8 @@ func fetchAvatar(with email: String) async {
let service = AvatarService()

do {
let result = try await service.fetchImage(with: email)
updateAvatar(with: result.image)
let result = try await service.fetchImage(with: .email(email))
updateAvatar(with: result.image)
} catch {
print(error)
}
Expand Down

0 comments on commit f95c3a3

Please sign in to comment.