mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-29 16:50:28 +00:00
26 lines
586 B
Swift
26 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?
|
||
|
}
|