forked from shadowfacts/Tusker
39 lines
878 B
Swift
39 lines
878 B
Swift
//
|
|
// StatusEdit.swift
|
|
// Pachyderm
|
|
//
|
|
// Created by Shadowfacts on 5/11/23.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct StatusEdit: Decodable {
|
|
public let content: String
|
|
public let spoilerText: String
|
|
public let sensitive: Bool
|
|
public let createdAt: Date
|
|
public let account: Account
|
|
public let poll: Poll?
|
|
public let attachments: [Attachment]
|
|
public let emojis: [Emoji]
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case content
|
|
case spoilerText = "spoiler_text"
|
|
case sensitive
|
|
case createdAt = "created_at"
|
|
case account = "account"
|
|
case poll
|
|
case attachments = "media_attachments"
|
|
case emojis
|
|
}
|
|
|
|
public struct Poll: Decodable {
|
|
public let options: [Option]
|
|
|
|
public struct Option: Decodable {
|
|
public let title: String
|
|
}
|
|
}
|
|
}
|