Request to add an endpoint that lists semesters for which data is available
Closed this issue · 8 comments
Would be nice if there were an endpoint that lists all the semesters for which there is course data is available (eg. Fall 2022, Summer 2022, Spring 2022, …, J-Term 2021, Fall 2020) so that front end devs don’t have to hard code the semesters or make assumptions like “X term schedule will be always available starting in Y month” or “only schedules from the past Z semesters are available.”
I’m also curious to know how does the /current/current
endpoint determines the current semester now? Is it just comparing the current date with some hard-coded dates like 9/1 or is it doing something fancier like scraping the academic calendar?
Hey! /current/current
just outputs hardcoded stuff, nothing advanced. I'm planning on adding something like what you suggested to the /info
endpoint of schedge v2, v1 likely will not have this functionality, as it's quite a bit harder to add with the current architecture.
Got it. Thank you!
This has been implemented in Schedge v2, but hasn't been released yet. Will update here when the release happens.
This has been released; Schedge v2 isn't fully ready for use, but the API is documented (poorly) at https://nyu.a1liu.com/api/#/paths/~1api~1terms/get , if you'd like to start using it.
Thanks a lot! I noticed that some schools like Stern, Tisch, and Tandon now have their undergraduate and graduate departments all under the same school but CAS/GSAS and Steinhardt still have two different schools each, one for undergraduate and one for graduate departments. Is this change intentional from v1, where undergraduate and graduate schools are all separate?
Yeah. It's due to the new scraping source, they don't make a distinction between grad and undergrad in the new NYU website for those schools. How high priority is the distinction for your app?
Oh that makes sense. I just want to be able to differentiate grad and undergrad schools, similar to how Bobcat Search used to worked. I am relying on the v1 /school
endpoint for that right now, which works mostly fine.
Upon some digging, I realized that a NYU_CLS_WRK_ACAD_CAREER$16$
field was set to UGRD
in the POST request when “Undergraduate” is selected from the “Academic Career” drop down menu on the left of sis.nyu.edu. The value for “Graduate” is GRAD
and apparently there are a lot more academic careers than just grad vs undergrad…
Maybe this field can be set when just scraping subjects? However sometimes the web page redirects back before the request finishes for some reason. Not sure how this might impact the scraping process. I am also comfortable with just using v1 for schools and subjects so no need to rush this at all.
Okay it is actually trivial for me to reverse engineer the school and school codes from what the v2 endpoint returns on the client side. No need for changes now.