UserInfoData

Class representing the user's informations and key datas.

Constructor

new UserInfoData(data)

Creates the user's informations and key datas.

Parameters:
NameTypeDescription
dataObject

The data object fetched from API.

Properties
NameTypeDescription
idNumber

The user's id.

userInfosObject

The user's informations

Properties
NameTypeDescription
ageNumber

The user's age

firstNameString

The user's first name

lastNameString

The user's last name

keyDataObject

The user's key data.

Properties
NameTypeDescription
calorieCountNumber

The user's calorie count

carbohydrateCountNumber

The user's carbonhydrate count

lipidCountNumber

The user's lipid count

proteinCountNumber

The user's protein count

scoreNumber

The user's score

todayScoreNumber

The user's score

Example
const userInfo = new UserInfoData(data)