1.0.1 • Published 3 years ago
siiau-js v1.0.1
A collection of helpful functions for the SIIAU UdeG system.
⚠ Warning
This module will only work in a NodeJs server environment, do not use it in the browser.
Features
This package contains the following functions and tools:
- Login to the Siiau platform using student code and NIP
- Get the information about the current logged in user, such as name, career, gpa, campus, etc.
Installation
Inside your nodejs project run the following command to add the library
npm install siiau-js
or if you're using yarn
yarn add siiau-js
Basic usage
Login to SIIAU
import { loginToSiiau } from "siiau-js";
const studentCode = "123456789";
const studentNip = "secretNip";
const { data, error } = await loginToSiiau(studentCode, studentNip);
const { pidm, cookies } = data;
Important note: pdim and cookies are required for every function, so you need to login before using any other method
Get the current student info
import { getStudentInfo } from "siiau-js";
const { name, gpa } = await getStudentInfo(pidm, cookies);
Return values
name
: The name of the studentgpa
: The current gpa of the studentcampus
: The UdeG campus the student is currently enrolledcareer
: The student's careerstatus
: Whether the student is active or notdegree
: The current student's degreefirstSeason
: When the student joined his careerlastSeason
: Last season the student studied