Alma Library Hours API

Introduction

Tarrant County College uses the Alma Library Hours API to present the open and close times of each of our five libraries. We present the information in 3 ways in various locations:

On our library homepage, we post the open/close hours for the current day. If the library is open that day, we also post a message reading either "Currently Open" or "Currently Closed"

On our library calendar, we post the hours for each day of a chosen month for a chosen campus library.

On our LibAnswers home page, we post the open/close hours for each library on the LibAnswers home page.

Please note that while I've included a version for Python 2.7 with Flask, I have never used Python or Flask in a production environment. The python zip files contain simple instructions for running the code in a virtualenv, but for running it in a production environment on a server, you're on your own. :-)

Parameters

Since we use the Alma hours API in these different ways, the PHP (or Python) code accepts GET parameters for library code, start date, end date, and format. The format parameter allows us to return XML, JSON, or a text snippet depending on our needs. For our purposes here at TCC, these are acceptable parameters (all parameters are optional):

campus

default:Northeast

parameters: Northeast, Northwest, South, Southeast, or TrinityRiv

You would change these to your library code

start

default: the current date

parameters: a date in the format YYYY-MM-DD which must occur chronologically before or equal to the end parameter, if present

end

default: the current date

parameters: a date in the format YYYY-MM-DD which must occur chronologically equal to or after the start parameter