Redis-backed caching server for the Open Data APIs. Intended for internal use at Penn Labs to speed up queries to Open Data.
- Install redis
- Install mysql
- Mac OS X:
brew install mysql
and these instructions- If you have trouble installing mysqlclient, follow the accepted answer here, except replace the
pip
withpipenv
- If you have trouble installing mysqlclient, follow the accepted answer here, except replace the
- Debian/Ubuntu:
apt-get install libmysqlclient-dev
- Mac OS X:
- Install pipenv:
pip install --user --upgrade pipenv
- Install requirements using
pipenv install -d
- If on macOS and mysql is throwing errors, try this
- Add environment secrets to
.env
in the root directory - Enter the virtual environment using
pipenv shell
- Run mobile API server with
./runserver.py
Use a word or phrase to search for a Penn building
URL | https://api.pennlabs.org/buildings/search |
||||||||
HTTP Methods | GET | ||||||||
Response Formats | JSON | ||||||||
Parameters |
|
Return the building corresponding to the given code
URL | https://api.pennlabs.org/buildings/{building_code} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Return a list of all dining venues
URL | https://api.pennlabs.org/dining/venues |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Return the week's hours for the venue with venue_id
URL | https://api.pennlabs.org/dining/hours/{venue_id} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Return the week's menus for the venue with venue_id
URL | https://api.pennlabs.org/dining/weekly_menu/{venue_id} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Return the daily menu for the venue with venue_id
URL | https://api.pennlabs.org/dining/daily_menu/{venue_id} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Search by name in the Penn Directory
URL | https://api.pennlabs.org/directory/search |
||||||||
HTTP Methods | GET | ||||||||
Response Formats | JSON | ||||||||
Parameters |
|
GET: https://api.pennlabs.org/directory/search?name=Alex%20Wissmann
Return the person with person_id
URL | https://api.pennlabs.org/directory/person/{person_id} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Search for courses by Department, Course Number, and Section
URL | https://api.pennlabs.org/registrar/search |
||||||||
HTTP Methods | GET | ||||||||
Response Formats | JSON | ||||||||
Parameters |
|
GET: https://api.pennlabs.org/registrar/search?q=cis-110
Return information on all laundry rooms
URL | https://api.pennlabs.org/laundry/halls |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Return a list of hall names, and their corresponding ids and locations.
URL | https://api.pennlabs.org/laundry/halls/ids |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Get information for a specific room by the hall_no. hall_no is given in the All Halls response.
URL | https://api.pennlabs.org/laundry/hall/{hall_no} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Get information for two rooms by the hall_nos. hall_no is given in the All Halls response.
URL | https://api.pennlabs.org/laundry/hall/{hall_no}/{hall_no_2} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Get information for multiple rooms by the hall_nos. hall_no is given in the All Halls response.
URL | https://api.pennlabs.org/laundry/rooms/{hall_no},{hall_no_2},{hall_no_3} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Get information about the usage of laundry machines in a certain hall. If no date is specified, the current date is used.
URL | https://api.pennlabs.org/laundry/usage/{hall_no}/{year}-{month}-{day} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Lists all the buildings with study rooms along with their corresponding IDs and services.
URL | https://api.pennlabs.org/studyspaces/locations |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Returns all the available rooms on a given date range given a building id. Dates are in the format 2018-01-28T14:00:00-0500
.
URL | https://api.pennlabs.org/studyspaces/availability/{building} |
|||||||||
HTTP Methods | GET | |||||||||
Response Formats | JSON | |||||||||
Parameters |
|
Books a room given the room information and the user's contact information.
URL | https://api.pennlabs.org/studyspaces/book |
||||||||||||||||||||||||||||||
HTTP Methods | POST | ||||||||||||||||||||||||||||||
Response Formats | JSON | ||||||||||||||||||||||||||||||
Headers |
|
||||||||||||||||||||||||||||||
Parameters |
|
Returns all the reservations for a given email and/or Wharton Session ID.
URL | https://api.pennlabs.org/studyspaces/reservations |
||||||||||||
HTTP Methods | GET | ||||||||||||
Response Formats | JSON | ||||||||||||
Parameters |
|
Cancels a room given a booking id or a list of booking ids.
URL | https://api.pennlabs.org/studyspaces/cancel |
||||||
HTTP Methods | POST | ||||||
Response Formats | JSON | ||||||
Headers |
|
||||||
Parameters |
|
Retrieves the current weather in Philly via the Open Weather Map API.
URL | https://api.pennlabs.org/weather |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Returns all events occurring 2 weeks from the current date.
URL | https://api.pennlabs.org/calendar/ |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Given a date in YYYY-MM-DD
format, returns all events occurring 2 weeks from that date.
URL | https://api.pennlabs.org/calendar/{date} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Finds a route, from all Penn Transit routes, which provides the shortest total walking distance to get from (latFrom, lonFrom) to (latTo, lonTo). If there is no path which shortens the travelers walking distance, an error is returned.
URL | https://api.pennlabs.org/transit/routing |
|||||||||||||||
HTTP Methods | GET | |||||||||||||||
Response Formats | JSON | |||||||||||||||
Parameters |
|
GET: https://api.pennlabs.org/transit/routing?latFrom=39.9533568&lonFrom=-75.2161194&latTo=39.9495731&lonTo=-75.12924031
Get information on all stops
URL | https://api.pennlabs.org/transit/stops |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Get information on all routes. This has the same information as the stops endpoint, but is indexed by route.
URL | https://api.pennlabs.org/transit/routes |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Get approximate usage data for locations in various fitness centers.
URL | https://api.pennlabs.org/fitness/usage |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Get the schedule for the open hours of various fitness centers.
URL | https://api.pennlabs.org/fitness/schedule |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |
Documentation for the athletics endpoints is located at the Labs pennathletics library SDK repository README
Register a UUID on the server and create a user account
URL | https://api.pennlabs.org/device/register |
|||||||||
HTTP Methods | POST | |||||||||
Response Formats | JSON | |||||||||
Parameters |
|
Validate whether token is valid. Note: You must access this endpoint over TLS/SSL (https).
URL | https://api.pennlabs.org/validate/{token} |
HTTP Methods | GET |
Response Formats | JSON |
Parameters | None |