API Reference¶
Office Api¶
Endpoint to serve complete offices.
This endpoint serves complete offices, and any legitimate bits of them. Queries may be either in json or as html queries. The response is negotiated according to the Accept: header of the request, and currently supports either application/json (for serialised objects) or text/html (for rendered objects).
Note that requesting parts of an office automatically suppresses requesting a page.
Api provider¶
API database functions¶
Handle database querying.
By abstracting it here we can just use dicts for testing.
-
officiumdivinum.api.database.assemble_martyrology(candidates: list, year: int)[source]¶ Assemble and resolve martyrolgy (easy, as we just stuff them together.)
- Parameters
candidates (list : candidates for the day.)
year (int : year.)
-
officiumdivinum.api.database.eval_year(year, yearless)[source]¶ - Parameters
year
yearless
as_list – (Default value = True)
-
officiumdivinum.api.database.get_office(office: str, calendar: str, datestr: str, language: str, translation: Optional[str])[source]¶ Get a particular office by calendar date.
Note that this currently just returns a made-up prime office.
- Parameters
office (str : Office name to get.)
calendar (str : Calendar to use.)
datestr (str : Date (as string, to parse with dateutils).)
language (str : Main Language.)
translation (Union[str : Second Language.)
None] (Or not)
- Returns
Office – An object based on Office() for the relevant office.
Martyrology API¶
Update Server¶
This module is purely for testing and will be dropped before the final release. It recieves a webhook from Github and triggers an update of the development server.
Re-used from.
which is under the MIT license.