DKUser

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

Represents a user on Dropmark. Can be the current user, collaborators, or users external to your team.

Note

Only when a user is retrieved from the /auth API endpoint will a token be returned
  • When listing collaborators within a collection, a Kind represents a user’s role within the collection

    See more

    Declaration

    Swift

    public enum Kind : String, CaseIterable
  • A user’s ability to act on the Dropmark platform

    See more

    Declaration

    Swift

    public enum Status : String, CaseIterable
  • id

    The unique identifier of the user

    Declaration

    Swift

    @objc
    public var id: NSNumber
  • The name of the user

    Declaration

    Swift

    public var name: String
  • The primary email of the user

    Declaration

    Swift

    @objc
    public var email: String?
  • The unique username of the user

    Declaration

    Swift

    @objc
    public var username: String?
  • Undocumented

    Declaration

    Swift

    public var customDomain: String?
  • Undocumented

    Declaration

    Swift

    public var sortBy: String?
  • Undocumented

    Declaration

    Swift

    public var sortOrder: String?
  • Undocumented

    Declaration

    Swift

    public var viewMode: String?
  • Undocumented

    Declaration

    Swift

    public var labels: Bool?
  • The membership tier of the user

    Declaration

    Swift

    public var plan: DKPlan
  • true if a paid membership is still active

    Declaration

    Swift

    public var planIsActive: Bool?
  • Undocumented

    Declaration

    Swift

    public var planQuantity: NSNumber?
  • The total amount of storage available for the current user (in bytes)

    Declaration

    Swift

    public var storageQuota: NSNumber
  • The amount of storage used by the current user (in bytes)

    Declaration

    Swift

    public var storageUsed: NSNumber
  • The primary email address associate with the teams billing account

    Declaration

    Swift

    public var billingEmail: String?
  • A user’s role within a collection

    Declaration

    Swift

    public var kind: Kind?
  • The active/inactive status of the user

    Declaration

    Swift

    public var status: Status
  • The date the user created their account

    Declaration

    Swift

    public var createdAt: Date?
  • The URL of the user’s avatar image

    Declaration

    Swift

    public var avatar: URL?
  • A list of all teams of which the user is a member.

    Declaration

    Swift

    public var teams: [DKTeam]?
  • Used to authenticate requests on behalf of the user. Note: A token value only returns from the /auth API endpoint

    Declaration

    Swift

    @objc
    public var token: String?
  • Initialize a local instance with an ID

    Declaration

    Swift

    public init(id: NSNumber, name: String = "")

    Parameters

    id

    The unique ID number to identify this user

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

    @objc
    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.

Utility

  • Undocumented

    Declaration

    Swift

    public override var description: String { get }