2020-08-30 23:33:11 +00:00
|
|
|
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
public struct Card: Codable, Hashable {
|
|
|
|
public enum CardType: String, Codable, Hashable, Unknowable {
|
|
|
|
case link, photo, video, rich, unknown
|
|
|
|
|
|
|
|
public static var unknownCase: Self { .unknown }
|
|
|
|
}
|
|
|
|
|
2021-03-29 06:04:14 +00:00
|
|
|
public let url: UnicodeURL
|
2020-08-30 23:33:11 +00:00
|
|
|
public let title: String
|
|
|
|
public let description: String
|
|
|
|
public let type: CardType
|
|
|
|
public let authorName: String?
|
|
|
|
public let authorUrl: String?
|
|
|
|
public let providerName: String?
|
|
|
|
public let providerUrl: String?
|
|
|
|
public let html: String?
|
|
|
|
public let width: Int?
|
|
|
|
public let height: Int?
|
2021-03-29 06:04:14 +00:00
|
|
|
public let image: UnicodeURL?
|
2020-08-30 23:33:11 +00:00
|
|
|
public let embedUrl: String?
|
|
|
|
}
|