Building an After-Market API for a library catalog
So I had to build an “after-market” API to take the html the catalog displays (yucky html at that), and turn it into nice tidy json data. This aspect of the project ended up taking more time then the Vue part, but could actually have some real use as the base for something workable. I’ll be the first to admit that scraping html with php repeatedly to parse out bits of data that are different in every view is a ridiculous hack. But it was fun to get it working. Currently it’s one-dimensional — in other words, it will get the first page of results, and scrape the data from a search, but you can’t enter into a full-view of an item, or a marc-record view from a result returned through the API. Those are wish-list features.
Here’s the library interface built on Vue (work in progress).
The After-Market Minerva API lives here (also a work in progress).
Leave a Reply