(API) Move library functionality for events & attendance into API controller