icssc / peterportal-public-api

API that provides easy-access to UC Irvine data such as: courses, professors, grade distribution, schedule of classes, and more
https://api.peterportal.org/
MIT License
23 stars 11 forks source link

Can't request grades for professors with hyphenated last names #224

Open js0mmer opened 1 year ago

js0mmer commented 1 year ago

Looking at the grades for COMPSCI 121, we can see data for sections with Krone-Martins and Gago-Masague with their instructor names listed as "KRONE MARTINS, A." and "GAGO MASAGUE, S.". If you try to request raw grade data for each instructor though using those exact strings, you get a syntax error.

Example: Request to /grades/raw?instructor=KRONE%20MARTINS,%20A. Response:

{"timestamp":"Sun, 12 Mar 2023 22:46:58 GMT","status":400,"error":"Bad Request: Invalid syntax in parameters","message":"Invalid syntax found in parameters. Exception occurred at 'KRONE MARTINS, A.' in the [instructor] query value"}

Making a request to /grades/raw?instructor=KRONE-MARTINS,%20A. doesn't work either and returns an empty array.