Skip to content

Commit

Permalink
All structures are public now. SPM access.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoMachorro committed Jul 22, 2023
1 parent 72daf05 commit 53c0521
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Sources/SwiftGravatar/SwiftGravatar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Crypto
public struct GravatarProfile: Decodable {
let entry: [Entry]

struct Entry: Decodable {
public struct Entry: Decodable {
let id: String?
let hash: String
let requestHash: String
Expand All @@ -30,28 +30,28 @@ public struct GravatarProfile: Decodable {
let urls: [Websites]?
}

struct Photo: Decodable {
public struct Photo: Decodable {
let value: String
let type: String // WISHLIST: Build Enum with all types
}

struct Name: Decodable {
public struct Name: Decodable {
let givenName: String?
let familyName: String?
let formatted: String?
}

struct Email: Decodable {
public struct Email: Decodable {
let primary: BooleanString
let value: String
}

struct InstantMessenger: Decodable {
public struct InstantMessenger: Decodable {
let type: String // WISHLIST: Build Enum with all types
let value: String
}

struct Account: Decodable {
public struct Account: Decodable {
let domain: String
let display: String
let url: String
Expand All @@ -60,13 +60,13 @@ public struct GravatarProfile: Decodable {
let shortname: String
}

struct Websites: Decodable {
public struct Websites: Decodable {
let value: String
let title: String
}

// WORKAROUND: Gravatar sends Booleans as Strings, which bypasses decoding.
enum BooleanString: String, Decodable {
public enum BooleanString: String, Decodable {
case yes = "true"
case no = "false" // swiftlint:disable:this identifier_name
}
Expand Down

0 comments on commit 53c0521

Please sign in to comment.