Introduction
A lightweight TypeScript wrapper for Wigor services
Welcome to the documentation for linkgor, a modern, lightweight, and zero-dependency TypeScript wrapper designed to interact with WigorServices portals.
Compatibility
linkgor is exclusively compatible with schools from the following educational groups:
Key Features
- 🔑 CAS Authentication - Built-in Central Authentication Service flow automation.
- 📅 Planning Retrieval - Retrieve student timetable/schedules within date ranges.
- 👤 Profile Parsing - Extract student profile attributes (name, email, city, etc.) from CAS attributes.
- 🪶 Zero Dependencies - Light package footprint relying on standard Web APIs (like native
fetch). - ⚡ TypeScript First - Built with TypeScript for full typing support and robust editor autocomplete.
- 🏫 Multi-School Support - Easy routing and configuration of endpoints for multiple campus instances.
Installation
Install linkgor using your preferred package manager:
# With pnpm
pnpm add @studentsphere/linkgor
# With npm
npm install @studentsphere/linkgor
# With yarn
yarn add @studentsphere/linkgorQuick Start
Here is a quick example showing how to authenticate a user, fetch their profile, and retrieve their schedule:
import { loginWithCredentials, getPlanning, getProfile } from 'linkgor';
async function run() {
// 1. Authenticate with the CAS server (returns user info and cookie jar token)
const user = await loginWithCredentials('epsi', 'john.doe', 'my_secure_password');
console.log(`Hello, ${user.firstname} ${user.lastname}!`);
// 2. Fetch the student's profile attributes
const profile = await getProfile('epsi', user.token);
console.log(`Email: ${profile.email}, Campus: ${profile.city}`);
// 3. Fetch the student's planning lessons
const lessons = await getPlanning('epsi', user.token);
console.log(`Retrieved ${lessons.length} lessons.`);
}
run().catch(console.error);Next Steps
To dive deeper into how linkgor works and explore its API, check out these sections: