User

public struct User

Represents a User

  • initalizes a User

    • paramter userData: dictionary of data to associate with the user

    Declaration

    Swift

    public init(userName: String, userData: [String: Any] = [:])

    Parameters

    userName

    name or id of the user

  • Returns all user information as a dictionary

    Declaration

    Swift

    public func getAllUserData() -> [String: Any]
  • Returns user information for provided key

    Declaration

    Swift

    public func getData<T>(_ key: String) -> T?
  • Returns user name of this User

    Declaration

    Swift

    public func userName() -> String?