MDCover

public struct MDCover
extension MDCover: Decodable
extension MDCover: Encodable

Structure representing a cover returned by MangaDex This is passed in the data property of an MDObject

  • The volume this cover belongs to, if entered by the uploader

    Declaration

    Swift

    public let volume: String?
  • The name of the file for this cover

    Use getCoverUrl to get the url for this cover

    Declaration

    Swift

    public let fileName: String?
  • This cover’s description, if entered by the uploader

    Declaration

    Swift

    public let description: String?
  • The date at which this cover entry was created on MangaDex

    Declaration

    Swift

    public let createdDate: Date
  • The date of the last update made to this cover entry on MangaDex

    Note

    This property will be nil if the cover was never modified after being created

    Declaration

    Swift

    public let updatedDate: Date?
  • The version of this type of object in the MangaDex API

    Declaration

    Swift

    public let version: Int
  • The URL for this cover

    Declaration

    Swift

    public func getCoverUrl(mangaId: String, size: MDCoverSize = .original) -> URL?

    Parameters

    mangaId

    The ID of the manga this cover belongs to

  • Convenience init used for update endpoints

    Declaration

    Swift

    public init(volume: String,
                description: String? = nil)