File
public struct File : DecodableAn 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.
- 
                  
                  DeclarationSwift public let album: ModelField<IAString>?
- 
                  
                  DeclarationSwift public let bitrate: ModelField<IAInt>?
- 
                  
                  DeclarationSwift public let crc32: ModelField<IAString>?
- 
                  
                  DeclarationSwift public let creator: ModelField<IAString>?
- 
                  
                  DeclarationSwift public let format: ModelField<IAString>?
- 
                  
                  DeclarationSwift public let height: ModelField<IAInt>?
- 
                  
                  DeclarationSwift public let length: ModelField<IATimeInterval>?
- 
                  
                  DeclarationSwift public let md5: ModelField<IAString>?
- 
                  
                  DeclarationSwift public let mtime: ModelField<IAInt>?
- 
                  
                  DeclarationSwift public let name: String
- 
                  
                  DeclarationSwift public let original: ModelField<IAString>?
- 
                  
                  DeclarationSwift public let sha1: ModelField<IAString>?
- 
                  
                  DeclarationSwift public let size: ModelField<IAInt>?
- 
                  
                  DeclarationSwift public let source: ModelField<IAString>?
- 
                  
                  DeclarationSwift public let title: ModelField<IAString>?
- 
                  
                  DeclarationSwift public let track: ModelField<IAInt>?
- 
                  
                  DeclarationSwift public let width: ModelField<IAInt>?
 View on GitHub
View on GitHub File Structure Reference
        File Structure Reference