DKReaction
@objc(DKReaction)
public final class DKReaction : NSObject, NSCoding, DKResponseObjectSerializable, DKResponseListSerializable
Reactions are essentially a way for a user to “Like” an item.
-
The unique identifier of the reaction
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 date the reaction was created
Declaration
Swift
public var createdAt: Date -
The date the reaction was last updated
Declaration
Swift
public var updatedAt: Date? -
The creator of the reaction
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
responseA network response assocated with serialization
representationA key-value object representing parameters and child objects.
-
Returns an object initialized from data in a given unarchiver.
Discussion: You typically return
selffrominit(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
coderAn 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
encoderAn archiver object.
View on GitHub
Install in Dash
DKReaction Class Reference