Janky temporary solution for campus map links #288
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Temporary fix for #286.
I was supprised to learn that the API for the old campus map still exists (example). The "_id" key in the response is what used to be used in the longer form of URLs that could be used to link to rooms. There are several Warwick services that will take this ID and translate it into a nearly always functional link to the new map. For example,
https://warwick.ac.uk/sitebuilder2/api/campus_map/location/ID_HERE, which is what I used for this PR.However, sometimes the link it produces to the new campus map doesn't work, and the old map's API probably won't exist forever, so this will need to be replaced in the future.
It's worth noting that https://tabula.warwick.ac.uk/admin/scientia-rooms lists these IDs for each room that it supports.