Event API - Mokerstier/Techteam-partematch GitHub Wiki
Functionality
For users to add an event to their profile, so that others can match to it, they need acces to a wide arrange of festivals. It would be best practice to get this data dynamically without us supervising every event that is possible for the user to add. So, for users to add every festival that they like, it needs to come from a centralized source. Therefore I researched several event API's to find the possibility where I could get festival data and make it addable to a profile. I found these 3 API's:
PredictHQ
This API looked the most promising, since it's a paid world wide service wich advertises itself as a large player in the event API market. However after testing some searching with postman, I could in fact easily get results, although major festivals like Lowlands and Dekmantel were not available.
Eventful
This API was second guess, and I was not surprised to find out it only offered 6 events in Amsterdam in the next 2/3 months. This API was scrapped fairly quickly
Ticketmaster
Ticketmaster was my second hope, because I know they keep a large database of almost every event that happens. The Discovery API however does not contain ALL events, it does contain the largest portion that I tested thusfar. I found out that setting the locale to * made a lot more events appear. I worked out this API in the end, although considering I needed to set the locale parameter, maybe predictHQ could've been really useful. The Ticketmaster API however, provides a wide arrange of images for every event, wich was the best way to prototype this function.
Progressive enhanced
After I got the API working and users were able to add events to their profile (the event ID gets added to their user document). I wanted to use progressive enhance this feature. I wanted the search to dynamically render events that were typed in the search box without pressing enter, however it needed to work on a browser which does not support the JS. So the search button still had to work. I made a simple API endpoint on our server, which accepts queries from the search bar. The search bar has an event listener that listens to input and after debouncing dynamically requests the data via the endpoint so that JS can generate nodes that get added to the container.