Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API response types/schema/documentation? #216

Open
Josh-Cena opened this issue Dec 26, 2023 · 2 comments
Open

API response types/schema/documentation? #216

Josh-Cena opened this issue Dec 26, 2023 · 2 comments

Comments

@Josh-Cena
Copy link

CourseTable here :)

I find that we are lacking any documentation about what shape the API responses are in. At least I didn't discover them easily on https://yalies.io/apidocs. It merely says:

The endpoint returns a JSON list of yale personnel.

And that:

Most properties can be filtered by, including netid, upi, email, mailbox, phone, title, first_name, preferred_name, middle_name, last_name, suffix, pronoun, school_code, school, year, curriculum, college, college_code, leave, birthday, residence, building_code, entryway, floor, suite, room, major, access_code, organization_code, organization, unit_class, unit_code, unit, office_building, and office_room.

However, there's no exhaustive list of attributes and their shapes! For example, what valid school_codes are there?

I request one of the three, but preferably all of them:

  1. TypeScript type defs to be published with https://github.com/Yalies/js-yalies (cooler if you author it in TS)
  2. JSON schema describing the API, either published with js-yalies, or published on the website available for external fetching
  3. Detailed documentation of response and request parameter shapes. See also Write more complete API documentation #31

These should help foster a helpful developer community. Thanks!

@bearsyankees
Copy link
Contributor

+1 :)

@ErikBoesen
Copy link
Collaborator

Hey folks, this is definitely something that we should add. For now, you can query the endpoint /filters and it will give you a JSON list of options for the non-open-ended fields. I'll see if I can find someone to put this, and more explicit documentation of the responses, into the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants