User

class User

Class representing a user and specifying the attributes associated with it.

Constructors

User
Link copied to clipboard
fun User()
Creates a user.
User
Link copied to clipboard
fun User(username: String, email: String, password: String)
Creates a user given a username, email address, and password.
User
Link copied to clipboard
fun User(username: String, email: String, password: String, userImg: String, bio: String)
Creates a user given a username, email address, password, profile picture, and short bio.

Properties

bio
Link copied to clipboard
private var bio: String? = null
Short bio of the user.
bookmarks
Link copied to clipboard
private var bookmarks: HashMap<String, Any?>
Identifiers of the posts bookmarked by the user.
email
Link copied to clipboard
private var email: String? = null
Email address of the user.
highlights
Link copied to clipboard
private var highlights: HashMap<String, Any?>
Identifiers of the highlights posted by the user.
password
Link copied to clipboard
private var password: String? = null
Password of the user.
upvotedPosts
Link copied to clipboard
private var upvotedPosts: HashMap<String, Any?>
Identifiers of the posts upvoted by the user.
userComments
Link copied to clipboard
private var userComments: HashMap<String, Any?>
Identifiers of the comments written by the user.
userId
Link copied to clipboard
private var userId: String? = null
Unique identifier of the user.
userImg
Link copied to clipboard
private var userImg: String? = null
Profile picture of the user.
username
Link copied to clipboard
private var username: String? = null
Username of the user.
userPosts
Link copied to clipboard
private var userPosts: HashMap<String, Any?>
Identifiers of the posts created by the user.
usersFollowed
Link copied to clipboard
private var usersFollowed: HashMap<String, Any?>
Identifiers of the users followed by the user.

Functions

getBio
Link copied to clipboard
fun getBio(): String?
Returns the short bio of the user.
getBookmarks
Link copied to clipboard
fun getBookmarks(): HashMap<String, Any?>
Returns the identifiers of the posts bookmarked by the user.
getEmail
Link copied to clipboard
fun getEmail(): String?
Returns the email address of the user.
getHighlights
Link copied to clipboard
fun getHighlights(): HashMap<String, Any?>
Returns the identifiers of the highlights posted by the user.
getPassword
Link copied to clipboard
fun getPassword(): String?
Returns the password of the user.
getUpvotedPosts
Link copied to clipboard
fun getUpvotedPosts(): HashMap<String, Any?>
Returns the identifiers of the posts upvoted by the user.
getUserComments
Link copied to clipboard
fun getUserComments(): HashMap<String, Any?>
Returns the identifiers of the comments written by the user.
getUserId
Link copied to clipboard
fun getUserId(): String?
Returns the unique identifier of the user.
getUserImg
Link copied to clipboard
fun getUserImg(): String?
Returns the profile picture of the user.
getUsername
Link copied to clipboard
fun getUsername(): String?
Returns the username of the user.
getUserPosts
Link copied to clipboard
fun getUserPosts(): HashMap<String, Any?>
Returns the identifiers of the posts created by the user.
getUsersFollowed
Link copied to clipboard
fun getUsersFollowed(): HashMap<String, Any?>
Returns the identifiers of the users followed by the user.
setBio
Link copied to clipboard
fun setBio(bio: String?)
Sets the short bio of the user to the specified string.
setBookmarks
Link copied to clipboard
fun setBookmarks(bookmarks: HashMap<String, Any?>)
Sets the identifiers of the posts bookmarked by the user to the specified strings.
setEmail
Link copied to clipboard
fun setEmail(email: String?)
Sets the email address of the user to the specified string.
setHighlights
Link copied to clipboard
fun setHighlights(highlights: HashMap<String, Any?>)
Sets the identifiers of the posts highlighted by the user to the specified strings.
setPassword
Link copied to clipboard
fun setPassword(password: String?)
Sets the password of the user to the specified string.
setUpvotedPosts
Link copied to clipboard
fun setUpvotedPosts(upvotedPosts: HashMap<String, Any?>)
Sets the identifiers of the posts upvoted by the user to the specified strings.
setUserComments
Link copied to clipboard
fun setUserComments(userComments: HashMap<String, Any?>)
Sets the identifiers of the comments written by the user to the specified strings.
setUserId
Link copied to clipboard
fun setUserId(userId: String?)
Sets the unique identifier of the user to the specified string.
setUserImg
Link copied to clipboard
fun setUserImg(userImg: String?)
Sets the profile picture of the user to the photo specified by the given URI.
setUsername
Link copied to clipboard
fun setUsername(username: String?)
Sets the username of the user to the specified string.
setUserPosts
Link copied to clipboard
fun setUserPosts(userPosts: HashMap<String, Any?>)
Sets the identifiers of the posts created by the user to the specified strings.
setUsersFollowed
Link copied to clipboard
fun setUsersFollowed(usersFollowed: HashMap<String, Any?>)
Sets the identifiers of the users followed by the user to the specified strings.