Files
ratebubble/ios/Ratebubble/Shared/Models.swift

30 lines
564 B
Swift

import Foundation
struct GetInfoRequest: Encodable {
let url: String
}
struct APIErrorPayload: Decodable, Error {
let code: String
let message: String
}
struct APIEnvelope<T: Decodable>: Decodable {
let success: Bool
let data: T?
let error: APIErrorPayload?
}
struct GetInfoResponse: Decodable {
let provider: String
let title: String
let year: Int?
let plot: String?
let ageRating: String?
let type: String
let genres: [String]
let cast: [String]
let backdrop: String?
let currentSeason: Int?
}