MDCustomList

public struct MDCustomList
extension MDCustomList: Decodable
extension MDCustomList: Encodable

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

  • The custom list’s name

    Declaration

    Swift

    public let name: String
  • The custom list’s visibility

    Declaration

    Swift

    public var visibility: MDCustomListVisibility
  • The custom list’s visibility

    Note

    Some custom lists have no owner, in which case this will be nil

    Declaration

    Swift

    public var owner: MDObject<MDUser>?
  • The list of manga UUIDs

    Important

    This is only used when creating a new list, it will never be filled when decoding

    Declaration

    Swift

    public let mangas: [String]?
  • The version of this type of object in the MangaDex API

    Declaration

    Swift

    public let version: Int
  • Convenience init used for create/update endpoints

    Declaration

    Swift

    public init(name: String, visibility: MDCustomListVisibility, mangas: [String])
  • Custom encode implementation to convert this structure to a JSON object

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws