opendataConcordiaU / documentation

Documentation and examples on the use of Concordia University open data API
35 stars 4 forks source link

Philosophy about adding new filters to the currently available endpoints #15

Closed volovikariel closed 2 years ago

volovikariel commented 2 years ago

I'm curious as to what the philosophy is regarding creating new filters.

Is it feasible to be add filters such as "by year" for the /course/schedule endpoint?

A call like the following (https://opendata.concordia.ca/API/v1/course/schedule/filter/*/BIOL/201) returns results from 2014, 2015, ..., now

If I only want to access specific years, then I'd have to filter the data somehow. Perhaps by using PostgreSQL's JSON types and querying the classStartDate/classEndDate strings based on the year, or by simply looping over the returned JSON if I only want to query things here and there.

Instead of having to handle all this, would it be possible to allow it to be queryable when calling the endpoint in the first place?

I'm not sure if this is something this repo wants to take responsibility of.

If we allow for querying by year, then what about by month, by day? It can quickly get out of hand (perhaps this repo is to serve more than as a data bank than as a GraphQL-like queryable dataset? so this really should just be the responsibility of the user?).

Thoughts?

Sorry for it not being a real "tech" issue. I really like the idea of this API that people (students in particular) can use to make neat projects like schedulers or whatever else. I'm curious as to what the responsibilities for the repo's maintainers are and what the user's responsibilities are. Perhaps we (the users) can write python code to filter the JSON files for specific endpoints and send them in as PRs?

opendataConcordiaU commented 2 years ago

Hi There,

There's no define policy on what filters to add, is a very hard thing to do since the data is very diverse and to create a 'one size fits all' policy seemed like a futile endeavor. The filters are created by the API's developers to provide some functionality and is based on the judgement of the developers and vetoed by the data owners. That being said, it is possible to add new filters if a use case justifies it.

Cheers

volovikariel commented 2 years ago

Thanks very much for the answer, that clears things up! :smiley:

SpencerMartel commented 1 year ago

16 @volovikariel Check it out, they seem to be open to creating a similar request to this one now!

volovikariel commented 1 year ago

@SpencerMartel That's very cool :) Thanks for letting me about this! If I may ask, what are you working on that brought about these requests in the first place?

SpencerMartel commented 1 year ago

Just for an old discord bot project, but it's still live: https://github.com/SpencerMartel/schedule_buddy The endpoint I was hitting was timing out and someone else noticed and created the issue. I was hitting the course/schedule/filter///* endpoint and filtering on my side to get the terms I want, this meant requesting every course since like 2013 which was a bit much

Tigre2325 commented 1 year ago

@volovikariel I am working on an app that would allow students to know the schedule of the rooms. That's why I need all courses of current semester to get their days and times to show them in a weekly view of the selected room

Like especially near finals, it would very useful to know if a room is available or not to go there and do review sessions with friends and use the blackboard.

For now, it will be on a per room basis, but I am planning to do some sort of search for a time slot to get all the rooms available or something like that.