DKCollection

@objc(DKCollection)
public final class DKCollection : NSObject, NSCoding, DKResponseObjectSerializable, DKResponseListSerializable

Collections are the main way things are organized in Dropmark. A collection has one owner, but has many items and users (AKA collaborators).

  • Privacy of a collection (and it’s items) are determined by the Kind

    See more

    Declaration

    Swift

    public enum Kind : String, CaseIterable
  • Sorting methods for child items. Note: This variable is maintained by the Dropmark API, and may differ from local sorting methods.

    See more

    Declaration

    Swift

    public enum SortBy : String
  • Render items in an ascending or descending fashion, as dictated by the sortBy variable.

    See more

    Declaration

    Swift

    public enum SortOrder : String
  • Different styles of presentation of items, as maintained by the Dropmark API

    See more

    Declaration

    Swift

    public enum ViewMode : String
  • id

    The unique identifier of the collection

    Declaration

    Swift

    public var id: NSNumber
  • The name of a collection

    Declaration

    Swift

    public var name: String
  • Not to be confused with the NSObject description, this is the Dropmark-defined description of a collection

    Declaration

    Swift

    public var descriptionText: String?
  • The privacy setting of a collection (and it’s items)

    Declaration

    Swift

    public var kind: Kind?
  • Undocumented

    Declaration

    Swift

    public var sort: NSNumber?
  • Sorting method for items contained by the collection

    Declaration

    Swift

    public var sortBy: SortBy?
  • Sort items by ascending or descending

    Declaration

    Swift

    public var sortOrder: SortOrder?
  • The type of view to render the items by

    Declaration

    Swift

    public var viewMode: ViewMode?
  • User-defined thumbnail image URL, if available

    Declaration

    Swift

    public var thumbnail: URL?
  • Undocumented

    Declaration

    Swift

    public var labels: Bool?
  • Returns true if the current user (as specified by the token in the network request) highighted this collection

    Declaration

    Swift

    public var highlighted: Bool?
  • A collection can be archived to remove it from a user’s dashboard without permanently deleting it

    Declaration

    Swift

    public var archived: Bool?
  • The date the user last visited the collection

    Declaration

    Swift

    public var lastAccessedAt: Date?
  • The date the collection was created

    Declaration

    Swift

    public var createdAt: Date
  • The date the last time the collection was updated

    Declaration

    Swift

    public var updatedAt: Date?
  • A count of all items contained within a collection

    Declaration

    Swift

    public var itemsTotalCount: NSNumber?
  • Undocumented

    Declaration

    Swift

    public var customDomain: String?
  • The total number of users and teams with access to this collection

    Declaration

    Swift

    public var usersTotalCount: NSNumber?
  • url

    A link to the collection on Dropmark

    Declaration

    Swift

    public var url: URL
  • A shortened link to the collection on Dropmark

    Declaration

    Swift

    public var shortURL: URL
  • A suite of thumbnails generated by Dropmark

    Declaration

    Swift

    public var thumbnails: DKThumbnails?
  • Representation of which actions the current user can and cannot perform.

    Declaration

    Swift

    public var permissions: DKPermissions?
  • The creator of the collection

    Declaration

    Swift

    public var user: DKUser
  • The collaborators associated with the collection

    Declaration

    Swift

    public var users: [DKUser]?
  • A list of items contained in the collection. Usually this is used to temporarily store up to 4 child items for a quadrant thumbnail, not as a store of all children items.

    Declaration

    Swift

    public var items: [DKItem]?

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 required 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.