Skip to content

Conversation

@haram082
Copy link
Contributor

@haram082 haram082 commented Sep 9, 2025

Context: We don't know have a way to check for current courses and add new coures/professors as needed per each new semester.

Solution: Added a new script to synchronize courses from the Pomona API with our MongoDB database, adding/updating course details.

  • Fetches all course department/requirement using api/CourseAreas endpoints
  • Fetches courses from all department/requirement areas via /api/Courses/{term}/{area}
  • Add new courses based on department (ex CSCI) or requirement (ex 4WRT)
  • Appends other existing requirements and departments as needed
  • Add current term key in term_keys to indicate this is a current course

To recreate, you will need an appropriate Course API key from ITS and then run
npx ts-node src/services/updateCourses.ts --term "2025;SP"

image

NOTE: This script does not add instructor ids yet as we want to link them to their Cxid instead.

@vercel
Copy link

vercel bot commented Sep 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
pomonastudents Ready Ready Preview Comment Sep 10, 2025 0:01am

@haram082 haram082 changed the title updateCourses script feature/updateCoursesUsingAPI Sep 9, 2025
@haram082 haram082 linked an issue Sep 10, 2025 that may be closed by this pull request
@haram082 haram082 self-assigned this Sep 10, 2025
@haram082 haram082 requested a review from ksantoso2 September 10, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Course API Integration Scirpt

2 participants