Class

UserService

UserService(cookie)

Constructor

# new UserService(cookie)

Creates an instance of UserService.
Parameters:
Name Type Description
cookie string The cookie value.

View Source user.service.ts, line 17

Methods

# async getAllStudentInfo() → {Promise.<Partial.<IUser>>}

Retrieves all available information about the student.

View Source user.service.ts, line 250

A promise that resolves to an object containing various student information.
Promise.<Partial.<IUser>>

# async getInfo() → {Promise.<AxiosResponse>}

Retrieves user information from the API.

View Source user.service.ts, line 32

A promise that resolves to the Axios response.
Promise.<AxiosResponse>

# async getPicture() → {Promise.<string>}

Retrieves the user's picture.

View Source user.service.ts, line 63

If the user has no picture.
Error
A promise that resolves to the URL of the user's picture.
Promise.<string>

# async getStaticInfos() → {Promise.<IUser>}

Retrieves static user information. If the user information has not been fetched yet, it calls the API to fetch it.

View Source user.service.ts, line 47

A promise that resolves to the static user information.
Promise.<IUser>

# async getStudentCredits() → {Promise.<number>}

Retrieves the user's credits.

View Source user.service.ts, line 166

A promise that resolves to the user's credits or 0 if it is not available.
Promise.<number>

# async getStudentCycle() → {Promise.<string>}

Retrieves the user's cycle.

View Source user.service.ts, line 150

A promise that resolves to the user's cycle or "Unknown" if it is not available.
Promise.<string>

# async getStudentEmail() → {Promise.<string>}

Retrieves the user's internal email.

View Source user.service.ts, line 198

A promise that resolves to the user's internal email.
Promise.<string>

# async getStudentGPA() → {Promise.<string>}

Retrieves the user's GPA.

View Source user.service.ts, line 134

A promise that resolves to the user's GPA or "Unknown" if it is not available.
Promise.<string>

# async getStudentGroups() → {Promise.<Array.<string>>}

Retrieves the user's groups.

View Source user.service.ts, line 182

A promise that resolves to an array of the user's group names or an empty array if there are no groups.
Promise.<Array.<string>>

# async getStudentLocation() → {Promise.<string>}

Retrieves the user's location.

View Source user.service.ts, line 121

A promise that resolves to the user's location.
Promise.<string>

# async getStudentName() → {Promise.<string>}

Retrieves the user's full name.

View Source user.service.ts, line 78

A promise that resolves to the user's full name.
Promise.<string>

# async getStudentNetsoul() → {Promise.<number>}

Retrieves the user's Netsoul active status.

View Source user.service.ts, line 224

A promise that resolves to the user's Netsoul active status.
Promise.<number>

# async getStudentNetsoulNorm() → {Promise.<number>}

Retrieves the user's Netsoul norm.

View Source user.service.ts, line 237

A promise that resolves to the user's Netsoul norm.
Promise.<number>

# async getStudentPhone() → {Promise.<string>}

Retrieves the user's phone number.

View Source user.service.ts, line 211

A promise that resolves to the user's phone number.
Promise.<string>

# async getStudentPromo() → {Promise.<number>}

Retrieves the user's promo.

View Source user.service.ts, line 108

A promise that resolves to the user's promo.
Promise.<number>

# async getStudentYear() → {Promise.<number>}

Retrieves the user's student year.

View Source user.service.ts, line 92

If the user has no student year.
Error
A promise that resolves to the user's student year.
Promise.<number>

# setUser(user) → {void}

Sets the user object.
Parameters:
Name Type Description
user IUser | null The user object to set.

View Source user.service.ts, line 25

void