Coder Social home page Coder Social logo

uf_api's Introduction

uf_api

A list of documentation and example code to access the University of Florida's public (undocumented) API

Courses

Gym

Common Data (admissions and whatnot)

Calendar Events

Campus Alerts

Crime Log

Voting

Campus Map Data

Contributing/Issues

Fork the repository and make a change. Submit a pull request and it will be promptly approved.

If you don't want to do that, feel free to open an issue.

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

[GET] https://one.ufl.edu/apix/soc/schedule/[parameters]

or if summer https://one.ufl.edu/apix/soc-summer/schedule/[parameters]

term and category are required. last-row is highly suggested

Sample call:

Bare Minimum:
https://one.ufl.edu/apix/soc/schedule/?category=RES&term=20165

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

Appended to the BaseURL as parameter=value1&parameter2=value2 ...

Semester/Term (Required)

Set which term to find courses i.e Fall 2018

Term=2188

Variable = [Year (with second 0 removed)][Semester number][optional Summer Semester]

Spring: 1
Summer: 5
Fall: 8

Spring 2018 : 20181 Summer 2018 : 20185 Summer A 2018 : 20185A 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)

Type of program course Category=CWSP

RES: Campus/Web/Special Program (Regular) (For Summer 2018 and before)
CWSP: Campus/Web/Special Program (Regular) (Fall 2018 and beyond)
UFO: UF online program
IA: Innovation Academy
HUR: USVI and Puerto Rico

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.

The JSON response from the API includes the last row and total number of rows as of the results as

[
  {
    "COURSES":[],
    "LASTROW": [number]
    "TOTALROWS": [number]
  }
]

COURSE CODE

course-code=eel3135 This parameter lets you pass the course code as a parameter

COURSE TITLE

Day of the week

List of true false, depending on availability

day-m: Monday
day-t: Tuesday
day-w: Wednesday
day-r: Thursday
day-f: Friday
day-s: Saturday/Sunday

If you want to check days you must pass [boolean] days=(false)

eep, cred-srch, credits

Credits

Specify the number of credits for the course credits=[number]

Gen-Ed Requirements

List of possible gen-ed requirements. Must pass ge

ge-b: ... To do ...
ge-c:
ge-d:
ge-h:
ge-m:
ge-n:
ge-p:
ge-s:

Instructor

To be explored

Open seats

no-open-seats=false

To be explored

Gym

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

[GET] http://recsports.ufl.edu/cam/cam8.jpg

SRFC (Student) Cardio

[GET] http://recsports.ufl.edu/cam/cam7.jpg

SWRC (Southwest) Weight Room 1

[GET] http://recsports.ufl.edu/cam/cam1.jpg

SWRC Weight Room 2

[GET] http://recsports.ufl.edu/cam/cam4.jpg

SWRC Cardio

[GET] http://recsports.ufl.edu/cam/cam5.jpg

SWRC Basketball Courts 1 - 2

[GET] http://recsports.ufl.edu/cam/cam3.jpg

SWRC Basketball Courts 3 - 4

[GET] http://recsports.ufl.edu/cam/cam2.jpg

SWRC Basketball Courts 5 - 6

[GET] http://recsports.ufl.edu/cam/cam6.jpg

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

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

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

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

https://www.sg.ufl.edu/Elections/Results

Campus Map Data

Location and metadata about places on campus that may be useful for creating a map app.

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

  • Buildings (No LAT/LON values): geo_buildings.json
  • Buildings (Contains LAT/LON values): search.json

  • Sports Fields: sport_fields.json
  • Urban Parks: urban_parks.json
  • Natural Areas: natural_areas.json
  • Construction: construction.json

  • Accessible Entrances: ada_entrance.json
  • Other Entrances: other_entrances.json
  • ADA Parking: ada_parking.json
  • ADA Routes: ada_paths.json
  • Bus Stops: bus_stops.json

  • SNAP Locaions: snap.json
  • AEDs: aed.json
  • Blue Phones: blp.json
  • Outdoor Speakers: spkrs.json

  • Walk-up Computers: computerlabs.json
  • Walk-up Printers: printers.json
  • Videoconferencing: video.json
  • Wireless Coverage: wireless.json

  • Dining: dining.json

  • Historic District: historic_district.json
  • Registered Locations: historic_register.json

  • Housing: housing.json

  • Libraries: library.json
  • Study Rooms: study.json
  • Open Study Areas: study_open.json

  • Decal Parking: parking_lots.json
  • ADA Parking: ada_parking.json
  • Carpool Parking: carpool.json
  • Metered Parking: meters.json
  • Scooter/Motorcycle Zone: scooters.json
  • Zip Cars: zip_car.json
  • EV Charging: ev_charging.json

  • Places of Interest: poi.json

  • Health & Wellness Services: health.json
  • Lactation Rooms: lactation.json
  • Recreation & Fitness: recfit.json

  • Student Services: student.json

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.

uf_api's People

Contributors

cameronwhitecs avatar rah-1 avatar rolstenhouse avatar thedpws avatar tylerjrichards avatar wuhugh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uf_api's Issues

Changed SOC parameter values for Summer and Fall 2018

The endpoints for the schedule of courses are actually a bit off for Fall 2018.

In the summer the base URL is actually https://one.uf.edu/apix/soc-summer/schedule/ (this is actually the base URL for Spring too for some reason0. The term you can append the letters A, B, or C for Summer A, B, or C.

The term for Fall is 2188 and the program isn't RES for regular, but CWSP instead.
https://one.ufl.edu/apix/soc/schedule/?category=CWSP&term=2188

Way to gather all possible courses in fall 2018

Here is some shit code I wrote, figured maybe somebody might find it useful. If you want the JSON that is generated from this lmk

  var self =this;
      console.log("Made " + x + " request");
      var url = "https://one.uf.edu/apix/soc/schedule/?category=CWSP&term=2188&last-control-number=" + x;
        request(url, function(error, response, html) {
          if (!error) {
            var temp = JSON.parse(html);
            for(var i =0; i<temp[0].COURSES.length; i++){
              self.courses.push(temp[0].COURSES[i].code);
              console.log(temp[0].COURSES[i].code);
            }
            if(x+50>10832){
               
              fs.writeFile("/public/json/allPossibleCourses.json", JSON.stringify(self.courses), 'utf8', function (err) {
                if (err) {
                    return console.log(err);
                }
                console.log("The file was saved!");
              });
            } 
            else{
              self.recourse(x+50, res);
            }
            
          }
        });
      
  }
  generatePossibleCourses(res){
    var x =0;
    this.courses = [];
    this.recourse(x, res);
  }
//Remove Duplicates
var temp={};
					var output =[];
					for(var i =0; i< data.length; i++){
						if(!temp[data[i]]){
							output.push({"title" : data[i]});
							temp[data[i]]=true;
						}
					}

New endpoint discovered (Add course)

This checks that you can add it

https://one.uf.edu/api/myschedule/term/2188/section/2555/add-check

This actually adds it

https://one.uf.edu/api/myschedule/term/2188/section/2555/add

Request payload

{"credits":3,"classNumber":12109,"gradBasis":"GRD","acadCareer":"UGRD"}

Courses - Last Control number isn't number of rows

I checked the API request against uf's portal course catalog and the last-control-number parameter does not seem to refer to the number of rows but rather the index to the next row.

Example:
The first call at the uf portal uses last-control-number=0.
The returned json has a LASTCONTROLNUMBER=3487.

The subsequent call when asking for rows 51-59 uses last-control-number=3487.
The returned json has a LASTCONTROLNUMBER=0 (no next row, references start).

Login credentials

How can I authenticate my UF API call using Javascript and Node.js?

Password hygene

Y'all don't look evil. But it's really really skeezy to ask folks to hand their passwords over to your code.

Wouldn't your API work go just as smoothly if you had them go to elearning (or maybe even login.ufl.edu) by hand, before running them?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.