Each endpoint corresponds to a specific function which returns a promise that resolves to the payload and which may require a list of parameters. These parameters should be passed in as an object. Some functions may accept different sets of parameters but all valid calls must include exactly the parameters in the given list (e.g the foodservicesMenu function must either consume no options or be provided with both the year and week). The output of each function is what is expected to be returned by the relevant endpoint (this is documented on the UW api. GET parameters can optionally be passed in as a second argument, see the code in README.md
See README.md
endpoint | function | parameters |
---|---|---|
/foodservices/menu | foodservicesMenu | None |
/foodservices/{year}/{week}/menu | foodservicesMenu | year, week |
/foodservices/notes | foodservicesNotes | None |
/foodservices/{year}/{week}/notes | foodservicesNotes | year, week |
/foodservices/diets | foodservicesDiets | None |
/foodservices/outlets | foodservicesOutlets | None |
/foodservices/locations | foodservicesLocations | None |
/foodservices/watcard | foodservicesWatcard | None |
/foodservices/announcements | foodservicesAnnouncements | None |
/foodservices/{year}/{week}/announcements | foodservicesAnnouncements | year, week |
/foodservices/products/{product_id} | foodservices | product_id |
/foodservices/products/search | foodservicesSearch | None |
/courses/{subject} | courses | subject |
/courses/{course_id} | courses | course_id |
/courses/{subject}/{catalog_number} | courses | subject, catalog_number |
/courses/{class_number}/schedule | coursesSchedule | class_number |
/courses/{subject}/{catalog_number}/schedule | coursesSchedule | subject, catalog_number |
/courses/{subject}/{catalog_number}/prerequisites | coursesPrerequisites | subject, catalog_number |
/courses/{subject}/{catalog_number}/examschedule | coursesExamschedule | subject, catalog_number |
/events | events | None |
/events/{site} | events | site |
/events/{site}/{id} | events | site, id |
/events/holidays | eventsHolidays | None |
/news | news | None |
/news/{site} | news | site |
/news/{site}/{id} | news | site, id |
/weather/current | weatherCurrent | None |
/terms/list | termsList | None |
/terms/{term_id}/examschedule | termsExamschedule | term_id |
/terms/{term_id}/{subject}/schedule | termsSchedule | term_id, subject |
/terms/{term_id}/{subject}/{catalog_number}/schedule | termsSchedule | term_id, subject, catalog_number |
/terms/{term_id}/infosessions | termsInfosessions | term_id |
/resources/tutors | resourcesTutors | None |
/resources/printers | resourcesPrinters | None |
/resources/infosessions | resourcesInfosessions | None |
/resources/goosewatch | resourcesGoosewatch | None |
/resources/sites | resourcesSites | None |
/codes/units | codesUnits | None |
/codes/terms | codesTerms | None |
/codes/groups | codesGroups | None |
/codes/subjects | codesSubjects | None |
/codes/instructions | codesInstructions | None |
/buildings/list | buildingsList | None |
/buildings/{building_acronym} | buildings | building_acronym |
/buildings/{building_acronym}/{room_number}/courses | buildingsCourses | building_acronym, room_number |
/api/usage | apiUsage | None |
/api/services | apiServices | None |
/api/methods | apiMethods | None |
/api/versions | apiVersions | None |
/api/changelog | apiChangelog | None |
/server/time | serverTime | None |
/server/codes | serverCodes | None |