diff --git a/README.md b/README.md index 0bddf61..b76fdb9 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,40 @@ ## uf_api -A list of documentation and example code to access the University of Florida's public (undocumented) API - -[Courses](#courses) - -[Gym](#gym) - -[Common Data](#common-data) (admissions and whatnot) - -[Calendar Events](#uf-calendar-events) - -[Campus Alerts](#uf-alerts) - -[Crime Log](#uf-crime-log) - -[Voting](#voting-data) - -[Campus Map Data](#campus-map-data) - -## Contributing/Issues -Fork the repository and make a change. Submit a pull request and it will be promptly approved. +A collection of documentation and example code to access the University of Florida's public (undocumented) API. + +## Table of Contents +- [Introduction](#introduction) +- [Installation](#installation) +- [API Usage Examples](#api-usage-examples) + - [Courses API](#courses) + - [Gym API](#gym) + - [Common Data](#common-data) + - [UF Calendar Events](#uf-calendar-events) + - [Campus Alerts](#uf-campus-alerts) + - [UF Crime Log](#uf-crime-log) + - [Voting Data](#voting-data) + - [Campus Map Data](#campus-map-data) +- [Contributing](#contributing) +- [Issues](#issues) + +## Introduction +`uf_api` is a repository that provides documentation and example code for accessing the University of Florida's public APIs. These APIs are not officially documented, making it challenging for developers to integrate UF data into their applications. This repository aims to provide clear and concise instructions, examples, and references to help developers get started quickly. + +## Installation +To use the code examples in this repository, you need to have `curl` installed on your machine. You can install `curl` using the following commands: + +**For macOS:** +```bash +brew install curl +``` -If you don't want to do that, feel free to open an issue. +## API Usage Examples -# Courses +### Courses This documents some of the API calls that can be made to get UF's course information. ** This API is currently changing at UF ** -#### BaseURL +##### BaseURL [GET] `https://one.ufl.edu/apix/soc/schedule/[parameters]` or if summer @@ -44,10 +51,10 @@ Complex: https://one.ufl.edu/apix/soc/schedule/?category=RES&course-code=&course-title=&cred-srch=&credits=&day-f=&day-m=&day-r=&day-s=&day-t=&day-w=&days=false&dept=+&eep=&fitsSchedule=false&ge=&ge-b=&ge-c=&ge-d=&ge-h=&ge-m=&ge-n=&ge-p=&ge-s=&instructor=&last-row=0&level-max=--&level-min=--&no-open-seats=false&online-a=&online-c=&online-h=&online-p=&period-b=&period-e=&prog-level=+&term=20181&var-cred=true&writing= ``` -### Parameters +#### Parameters Appended to the BaseURL as `parameter=value1¶meter2=value2` ... -#### Semester/Term (Required) +##### Semester/Term (Required) Set which term to find courses i.e Fall 2018 ```Term=2188``` @@ -67,7 +74,7 @@ Fall 2018 : 2188 The base URL for summer is changed. To find courses for semester A, append A. The same holds for semester B and C -#### Program/Category (Required) +##### Program/Category (Required) Type of program course ```Category=CWSP``` @@ -79,7 +86,7 @@ IA: Innovation Academy HUR: USVI and Puerto Rico ``` -#### Number of Results (Required) +##### Number of Results (Required) This API limits the number of returned courses to 50. In order to get results 51-100 you must set `last-control-number=50`. The API is changing. it could use `last-control-number` or `last-row`. @@ -96,13 +103,13 @@ The JSON response from the API includes the last row and total number of rows as ] ``` -#### COURSE CODE +##### COURSE CODE `course-code=eel3135` This parameter lets you pass the course code as a parameter -#### COURSE TITLE +##### COURSE TITLE -#### Day of the week +##### Day of the week List of true false, depending on availability ``` day-m: Monday @@ -114,13 +121,13 @@ day-s: Saturday/Sunday ``` If you want to check days you must pass [boolean] `days=(false)` -#### eep, cred-srch, credits +##### eep, cred-srch, credits -#### Credits +##### Credits Specify the number of credits for the course `credits=[number]` -#### Gen-Ed Requirements +##### Gen-Ed Requirements List of possible gen-ed requirements. Must pass `ge` ``` @@ -134,80 +141,80 @@ ge-p: ge-s: ``` -#### Instructor +##### Instructor To be explored -#### Open seats +##### Open seats `no-open-seats=false` To be explored -# Gym +### Gym -#### Live Cameras at SWRC and Student Rec +##### Live Cameras at SWRC and Student Rec Live cameras placed in SouthWest Rec Center update images once every second. Old images are replaced. -#### SRFC (Student) Weight Room +##### SRFC (Student) Weight Room [GET] `http://recsports.ufl.edu/cam/cam8.jpg` -#### SRFC (Student) Cardio +##### SRFC (Student) Cardio [GET] `http://recsports.ufl.edu/cam/cam7.jpg` -#### SWRC (Southwest) Weight Room 1 +##### SWRC (Southwest) Weight Room 1 [GET] `http://recsports.ufl.edu/cam/cam1.jpg` -#### SWRC Weight Room 2 +##### SWRC Weight Room 2 [GET] `http://recsports.ufl.edu/cam/cam4.jpg` -#### SWRC Cardio +##### SWRC Cardio [GET] `http://recsports.ufl.edu/cam/cam5.jpg` -#### SWRC Basketball Courts 1 - 2 +##### SWRC Basketball Courts 1 - 2 [GET] `http://recsports.ufl.edu/cam/cam3.jpg` -#### SWRC Basketball Courts 3 - 4 +##### SWRC Basketball Courts 3 - 4 [GET] `http://recsports.ufl.edu/cam/cam2.jpg` -#### SWRC Basketball Courts 5 - 6 +##### SWRC Basketball Courts 5 - 6 [GET] `http://recsports.ufl.edu/cam/cam6.jpg` -# Common-Data +### Common-Data https://ir.aa.ufl.edu/reports/common-data-set/ These are all pdfs which contain demographic information on UF's student body -# UF Calendar Events +# UF Calendar Events ```https://ufl.lwcal.com/live/calendar/view/week?user_tz=America%2FDetroit&syntax=%3Cwidget%20type%3D%22events_calendar%22%3E%3Carg%20id%3D%22modular%22%3Etrue%3C%2Farg%3E%3Carg%20id%3D%22default_view%22%3Eweek%3C%2Farg%3E%3Carg%20id%3D%22month_view_day_limit%22%3E3%3C%2Farg%3E%3Carg%20id%3D%22show_sidebar%22%3Efalse%3C%2Farg%3E%3Carg%20id%3D%22mini_cal_heat_map%22%3Etrue%3C%2Farg%3E%3Carg%20id%3D%22thumb_width%22%3E160%3C%2Farg%3E%3Carg%20id%3D%22thumb_height%22%3E160%3C%2Farg%3E%3Carg%20id%3D%22show_groups%22%3Etrue%3C%2Farg%3E%3Carg%20id%3D%22show_tags%22%3Etrue%3C%2Farg%3E%3Carg%20id%3D%22development%22%3Etrue%3C%2Farg%3E%3C%2Fwidget%3E``` To be explored -# UF Alerts +### UF Campus Alerts ``` https://lists.ufl.edu/cgi-bin/wa?RSS&L=UF-ALERT-GAINESVILLE&v=2.0 ``` Returns XML element. Currently uses RSS To be explored -# UF Crime Log +### UF Crime Log ```http://www.police.ufl.edu/wp-content/asp/crimelog/default2.asp``` Though UF doesn't offer an API for its crime log, you can scrape data from the page using the PoliceRequest API files in the src folder of this repository. Note, however, that the layout of the page could change at any time, rendering implementations of the PoliceRequest API useless. PHP is the only language currently supported. To be explored -# Voting Data +### Voting Data ```https://www.sg.ufl.edu/Elections/Results``` -# Campus Map Data +### Campus Map Data Location and metadata about places on campus that may be useful for creating a map app. -### Base URL +#### Base URL ```https://campusmap.ufl.edu/library/cmapjson/[resource]``` For example, to get the JSON array of all bus stops: https://campusmap.ufl.edu/library/cmapjson/bus_stops.json -#### Resource Values +##### Resource Values - Buildings (No LAT/LON values): `geo_buildings.json` - Buildings (Contains LAT/LON values): `search.json` ---- @@ -259,7 +266,19 @@ For example, to get the JSON array of all bus stops: https://campusmap.ufl.edu/l ---- - Student Services: `student.json` -#### Linking to the Map +##### Linking to the Map You can link directly to a building or other point of reference by following the example URL: `http://campusmap.ufl.edu/#/index/0001/17` The first parameter (a four digit code) should be the building number or the object ID to center the map on. The second parameter (a two digit number) should be the desired zoom level. If no zoom level is given the default will be 17. + +# Contributing +We welcome contributions! If you would like to contribute to this repository, please follow these steps: + +Fork the repository: Click the "Fork" button at the top-right corner of this page. +Clone your fork: +``` bash +git clone https://github.com/your-username/uf_api.git +``` + +# Issues +If you encounter any problems or have suggestions, feel free to open an issue. We will address it promptly. \ No newline at end of file