sandboxnu / course-catalog-api

API for Course Catalog, Courses, Sections, and Search! Used by SearchNEU and GraduateNU
GNU Affero General Public License v3.0
11 stars 5 forks source link

Search NEU eventual notification backend needs data to notify #5

Open NEUDitao opened 3 years ago

NEUDitao commented 3 years ago

On the new updater, we should send bodies of the following form to https://searchneu.com/api/notify_users:

// records of hash -> search query info
{
  updatedCourses: CourseNotificationInfo[];
  updatedSections: SectionNotificationInfo[];
}

Where CourseNotificationInfo and SectionNotificationInfo are defined as

type CourseNotificationInfo = {
  courseCode: string;
  courseHash: string;
  term: string;
  numberOfSectionsAdded: number;
  campus: string;
};

type SectionNotificationInfo = {
  courseCode: string;
  sectionHash: string;
  term: string;
  seatsRemaining: number;
  crn: string;
  campus: string;
};

and courseCode is subject + classID (for instance, CS 2500)

(subject to change, mostly when @gamburgm and @dajinchu stop talking about Alignable)

gamburgm commented 3 years ago

Can we rename one of courseCode and courseHash?

gamburgm commented 3 years ago

also, by campus do you mean host or cps / law?