File
public struct File : Decodable
An Internet Archive File
This will be returned in the files
property from an InternetArchive().itemDetail()
request.
Note: The properties are all type ModelField<T>
except name
, which is a String
.
This means you need to access all values by their .value
or .values
properties, except for identifier
,
which you can access directly.
Some Background: All other fields can be a string or array of strings so we can’t access them
directly. See the ModelField
class for a more thorough explanation.
For example:
let file = File(...some file...)
file.name = "SCIRedRocksConcert.track1.mp3" // `name` is always a String, it's like the primary key for the file
file.length.value = TimeInterval object // we want to cast all other fields to their native type
See the Internet Archive’s Python API Reference for a description of the properties.
Note: This is not an exhaustive list of properties. If you need some that are missing, please open a pull request.
-
Declaration
Swift
public let album: ModelField<IAString>?
-
Declaration
Swift
public let bitrate: ModelField<IAInt>?
-
Declaration
Swift
public let crc32: ModelField<IAString>?
-
Declaration
Swift
public let creator: ModelField<IAString>?
-
Declaration
Swift
public let format: ModelField<IAString>?
-
Declaration
Swift
public let height: ModelField<IAInt>?
-
Declaration
Swift
public let length: ModelField<IATimeInterval>?
-
Declaration
Swift
public let md5: ModelField<IAString>?
-
Declaration
Swift
public let mtime: ModelField<IAInt>?
-
Declaration
Swift
public let name: String
-
Declaration
Swift
public let original: ModelField<IAString>?
-
Declaration
Swift
public let sha1: ModelField<IAString>?
-
Declaration
Swift
public let size: ModelField<IAInt>?
-
Declaration
Swift
public let source: ModelField<IAString>?
-
Declaration
Swift
public let title: ModelField<IAString>?
-
Declaration
Swift
public let track: ModelField<IAInt>?
-
Declaration
Swift
public let width: ModelField<IAInt>?