mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-23 05:56:30 +00:00
25 lines
586 B
Swift
25 lines
586 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
struct Card: Codable, Hashable {
|
|
enum CardType: String, Codable, Hashable, Unknowable {
|
|
case link, photo, video, rich, unknown
|
|
|
|
static var unknownCase: Self { .unknown }
|
|
}
|
|
|
|
let url: URL
|
|
let title: String
|
|
let description: String
|
|
let type: CardType
|
|
let authorName: String?
|
|
let authorUrl: String?
|
|
let providerName: String?
|
|
let providerUrl: String?
|
|
let html: String?
|
|
let width: Int?
|
|
let height: Int?
|
|
let image: URL?
|
|
let embedUrl: String?
|
|
}
|