When you're developing a piece of software to be used almost exclusively by other developers, it's probably important to create an API ~to avoid people throwing tomatoes at you~.
In case we make scripts to distribute to professors/graders which pull information effectively, a good API will be immensely useful.
Two considerations:
make all web endpoints double as API endpoints by creating serialization functions on our objects (ask me about this if it's confusing). This is clever and saves a lot of time/work but makes it so any change we make to the website has the potential to modify the API behavior, and disallows versioning to make sure legacy software still works.
be normal and have api endpoints in /api/v1/<endpoint> and do it that way.
It's hard to say who will be using the API but the second one is more flexible. The second one also isn't much work beyond the first one, we can still do serializable objects (to JSON) but we just have to be more specific about what attributes to provide (in case we add more attributes).
Sorry if this is unclear-- if someone comes across this issue and actually wants to learn more, please ping me and I'll provide examples of everything I've mentioned. This is just a thought pad of things which will jog my memory.
When you're developing a piece of software to be used almost exclusively by other developers, it's probably important to create an API ~to avoid people throwing tomatoes at you~.
In case we make scripts to distribute to professors/graders which pull information effectively, a good API will be immensely useful.
Two considerations:
/api/v1/<endpoint>
and do it that way.It's hard to say who will be using the API but the second one is more flexible. The second one also isn't much work beyond the first one, we can still do serializable objects (to JSON) but we just have to be more specific about what attributes to provide (in case we add more attributes).
Sorry if this is unclear-- if someone comes across this issue and actually wants to learn more, please ping me and I'll provide examples of everything I've mentioned. This is just a thought pad of things which will jog my memory.