@@ -94,7 +94,9 @@ async def get_term_instructors(
9494 return data
9595
9696
97- async def get_all_attributes (session : aiohttp .ClientSession ) -> list [dict [str , str ]]:
97+ async def get_all_attributes (
98+ session : aiohttp .ClientSession , search_term : str = ""
99+ ) -> list [dict [str , str ]]:
98100 """
99101 Fetches the master list of attributes from SIS.
100102
@@ -108,7 +110,7 @@ async def get_all_attributes(session: aiohttp.ClientSession) -> list[dict[str, s
108110 ]
109111 """
110112 url = "https://sis9.rpi.edu/StudentRegistrationSsb/ssb/classSearch/get_attribute"
111- params = {"offset" : 1 , "max" : 2147483647 }
113+ params = {"searchTerm" : search_term , " offset" : 1 , "max" : 2147483647 }
112114 async with session .get (url , params = params ) as response :
113115 response .raise_for_status ()
114116 raw_data = await response .text ()
@@ -117,7 +119,9 @@ async def get_all_attributes(session: aiohttp.ClientSession) -> list[dict[str, s
117119 return data
118120
119121
120- async def get_all_colleges (session : aiohttp .ClientSession ) -> list [dict [str , str ]]:
122+ async def get_all_colleges (
123+ session : aiohttp .ClientSession , search_term : str = ""
124+ ) -> list [dict [str , str ]]:
121125 """
122126 Fetches the master list of colleges (schools) and codes from SIS.
123127
@@ -131,7 +135,7 @@ async def get_all_colleges(session: aiohttp.ClientSession) -> list[dict[str, str
131135 ]
132136 """
133137 url = "https://sis9.rpi.edu/StudentRegistrationSsb/ssb/classSearch/get_college"
134- params = {"offset" : 1 , "max" : 2147483647 }
138+ params = {"searchTerm" : search_term , " offset" : 1 , "max" : 2147483647 }
135139 async with session .get (url , params = params ) as response :
136140 response .raise_for_status ()
137141 raw_data = await response .text ()
0 commit comments