Ferrite-backup/Ferrite/Models/PremiumizeModels.swift
kingbri d0728e1a9b Debrid: Make TorBox a rich service and fix cloud downloads
TorBox can now show if there's a batch before loading a file.

Cloud downloads should check the server in case there's a different
method to fetch a download link.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-06-16 15:00:35 -05:00

74 lines
1.5 KiB
Swift

//
// PremiumizeModels.swift
// Ferrite
//
// Created by Brian Dashore on 11/28/22.
//
import Foundation
extension Premiumize {
// MARK: - CacheCheckResponse
struct CacheCheckResponse: Codable {
let status: String
let response: [Bool]
}
// MARK: - DDLResponse
struct DDLResponse: Codable {
let status: String
let content: [DDLData]?
let filename: String
let filesize: Int
}
// MARK: Content
struct DDLData: Codable {
let path: String
let size: Int
let link: String
enum CodingKeys: String, CodingKey {
case path, size, link
}
}
// MARK: - AllItemsResponse (listall endpoint)
struct AllItemsResponse: Codable {
let status: String
let files: [UserItem]
}
// MARK: User Items
// Abridged for required parameters
struct UserItem: Codable {
let id: String
let name: String
let mimeType: String
enum CodingKeys: String, CodingKey {
case id, name
case mimeType = "mime_type"
}
}
// MARK: - ItemDetailsResponse
// Abridged for required parameters
struct ItemDetailsResponse: Codable {
let id: String
let name: String
let link: String
let mimeType: String
enum CodingKeys: String, CodingKey {
case id, name, link
case mimeType = "mime_type"
}
}
}