A service for requesting information from various APIs.
Members
Methods
-
getCalendar
-
Retrieve data for the calendar on the event search page.
Returns:
A promise representing the file request
-
getCollectionLists (fileName)
-
Retrieve the data for the collection and finding aid lists.
Parameters:
Name Type Description fileName Name of the JSON file to open.
Returns:
A promise representing the file request
-
getMenus
-
Retrieve the header and footer menu links. Cache the the information while the app is active in the browser.
-
getPartsContext (dataID, context)
-
Retrieve the page data from the WordPress API.
Parameters:
Name Type Description dataID Id, or slug, representing an item to retrieve given a particular context
context Type of data to retrieve, e.g. posts, pages, or events
Returns:
Promise representing the request to the API
-
handleError (error, path, status)
-
Redirect to the resolver, so it can determine the best next steps.
Parameters:
Name Type Description error The problem as reported by the API
path URL which produced the error
status Status returned by the API
-
handleMajorError
-
Redirect to the maintenance page, this only occurs if the site is broken.