Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.
Tahir Poduska edited this page Feb 9, 2016 · 5 revisions

External Data Sources

Hours Service

The new Mann website will use CUL's LibCal instance for managing hours and exceptions. LibCal provides a read-only REST-ful API with two endpoints:

A JSON response will be requested, but additional supported formats include HTML, JavaScript, XML, and RSS.

Further details

Today’s Hours

  1. All Locations:
    https://api3.libcal.com/api_hours_today.php?iid=973&lid=0&format=json

  2. Mann Library:
    https://api3.libcal.com/api_hours_today.php?iid=973&lid=1707&format=json

Weekly Data

We will request data for 52 weeks. (Note: This number will be tweaked if needed based on the response time.) Parameters: Institutional id, iid =973, Library id, For Mann, lid=1707.

  1. Mann Library weekly hours (Includes all departments):
    https://api3.libcal.com/api_hours_grid.php?iid=973&format=json&weeks=52

  2. Weekly hours for a department
    Each library/department gets a unique lid number. We can use this as a parameter to request the weekly hours for a department. For a library, the api returns the hours for both the library and all the departments under the library. https://api3.libcal.com/api_hours_grid.php?iid=973&lid=1707&format=json&weeks=52 For example, the lid for the Lobby is 1709 (You can find this in settings).
    https://api3.libcal.com/api_hours_grid.php?iid=973&lid=1709&format=json&weeks=52

Future Date

This is a new endpoint that was created by the developer in October 2015 at our request. It's currently undocumented by the vendor. Note: It returns times.currently_open and times.status as seen in the today's hours endpoint but this really is not applicable here since this endpoint is meant to return hours for a future date.

https://api3.libcal.com/api_hours_date.php?iid=973&format=json&date=2015-11-21

Clone this wiki locally