Wrapper for LiturgicalCalendarAPI to implement Directus-like filtering.
This project began as a quick and dirty attempt at implementing/demonstrating this suggestion in deno/Typescript, but it ended up being a fairly complete solution that met my use case.
The best way to experiment with this wrapper is to test out some queries using the playground. It does not support all features, since the filter options are practically endless, but it has the most popular options.
GET https://litcal.deno.dev/api/fetch
Query Params:
endpointThe LitCal API endpoint you wish to use. E.gcalendar. Required.filterTakes in a data field key, a filter type, and a filter value. E.gfilter[grade_lcl][_eq]=SOLEMNITY. Filter keys from Directus (Since they are similar enough) can be found here. Data keys can be found in this schema. Multiplefilterquery params can be sent in a single request. E.g?filter[grade_lcl][_eq]=SOLEMNITY&filter[name][_icontains]=Sundaywill provide all events that satisfy BOTHgrade_lcl=SOLEMNITYAND haveSundayin thenamefield. If two filters are of the same field and operator, the wrapper returns results of EITHER filter. E.g?filter[grade_lcl][_eq]=SOLEMNITY&filter[name][_eq]=FEASTgives any results with EITHERgrade_lcl=SOLEMNITYORgrade_lcl=FEAST. Default, none.fieldsCSV string of data field keys to include in each object. E.gname,date,month_short. Default, all.returnTypeOnly supports json or ics. E.greturnType=ics. Default,json.- Any other query params will be sent to LitCal api. E.g
locale,year_type.
Requires Deno.
deno task start
I recommend using the free tier of Deno Deploy.