DKComment
@objc(DKComment)
public final class DKComment : NSObject, NSCoding, DKResponseObjectSerializable, DKResponseListSerializable
Comments can be added to individual items.
-
The unique identifier of the comment
Declaration
Swift
public var id: NSNumber
-
The unique identifier for the associated item
Declaration
Swift
public var itemID: NSNumber?
-
The name of the associated item
Declaration
Swift
public var itemName: String?
-
The unique identifier of the parent collection
Declaration
Swift
public var collectionID: NSNumber?
-
The name of the parent collection
Declaration
Swift
public var collectionName: String?
-
The Dropmark link of the parent collection
Declaration
Swift
public var collectionURL: URL?
-
The body text of the comment. This string may contain Markdown-formatted text, including references to images.
Declaration
Swift
public var body: String
-
The date the comment was created
Declaration
Swift
public var createdAt: Date
-
The date the the comment was last updated
Declaration
Swift
public var updatedAt: Date?
-
Undocumented
Declaration
Swift
public var annotation: String?
-
Undocumented
Declaration
Swift
public var url: URL?
-
Undocumented
Declaration
Swift
public var shortURL: URL?
-
The creator of the comment
Declaration
Swift
public var user: DKUser?
-
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.
-
Returns an object initialized from data in a given unarchiver.
Discussion: You typically return
self
frominit(coder:)
. If you have an advanced need that requires substituting a different object after decoding, you can do so inawakeAfter(using:)
.
Declaration
Swift
public required init?(coder aDecoder: NSCoder)
Parameters
coder
An unarchiver object.
Return Value
self
, initialized using the data incoder
. -
Encodes the receiver using a given archiver.
Declaration
Swift
public func encode(with aCoder: NSCoder)
Parameters
encoder
An archiver object.