DKPermissions

@objc(DKPermissions)
public class DKPermissions : NSObject, NSCoding

In a collection, the permissions represent what actions the current user can and cannot perform.

  • true if the user holds administrator status over the collection

    Declaration

    Swift

    public var admin: Bool?
  • true if the user can edit the collection’s items and metadata

    Declaration

    Swift

    public var edit: Bool?
  • true if the user can share the collection with the public

    Declaration

    Swift

    public var share: Bool?
  • true if the user can leave the collection

    Declaration

    Swift

    public var leave: Bool?
  • `true if the user can delete the collection

    Declaration

    Swift

    public var delete: Bool?

DKResponseObjectSerializable

  • Serializes a new instance from the provided network response and key-value representation. The representation is validated for the required parameters, then fills in optional parameters as necessary.

    Declaration

    Swift

    public init?(response: HTTPURLResponse, representation: Any)

    Parameters

    response

    A network response assocated with serialization

    representation

    A key-value object representing parameters and child objects.

NSCoding

  • Returns an object initialized from data in a given unarchiver.

    • Discussion: You typically return self from init(coder:). If you have an advanced need that requires substituting a different object after decoding, you can do so in awakeAfter(using:).

    Declaration

    Swift

    public required init(coder aDecoder: NSCoder)

    Parameters

    coder

    An unarchiver object.

    Return Value

    self, initialized using the data in coder.

  • Encodes the receiver using a given archiver.

    Declaration

    Swift

    public func encode(with aCoder: NSCoder)

    Parameters

    encoder

    An archiver object.