MDGroup

public struct MDGroup
extension MDGroup: Decodable
extension MDGroup: Encodable

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

  • The group’s name

    Declaration

    Swift

    public let name: String
  • The group’s leader

    Declaration

    Swift

    public let leader: MDObject<MDUser>
  • The list of members of this group

    Note

    The leader is not included in this list

    Declaration

    Swift

    public let members: [MDObject<MDUser>]
  • The date at which this group was created on MangaDex

    Declaration

    Swift

    public let createdDate: Date
  • The date of the last update made to this group’s information on MangaDex

    Note

    This property will be nil if the group 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
  • Convenience init used for create/update endpoints

    Declaration

    Swift

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

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws