Skyward REST
Summary
Unofficial Rest API for Skyward
- Queries data for the fastest output
- Breaks down and parses complex responses
- Handles edge cases with ease
- Built functionally
Examples
Boilerplate
const skyward = const url = 'https://skyward.cooldistrict.net/...' const scraper = // the scraper!
Scrape a user's course gradebook
scraper // => Large Object
Scrape a user's academic history
scraper // => Array of Sizeable Objects
API
- skyward( loginURL )
- .scrapeReport( user, pass )
- .scrapeGradebook( user, pass, options )
- .scrapeHistory( user, pass )
skyward( loginURL )
Function which returns an object containing the API.
- loginURL string - URL to the login page of the specific district's Skyward domain. Note that the URL should not redirect.
const skyward = // => { usable functions }
.scrapeReport( user, pass )
Fetches and parses a student's report card, returning a promise which results in an object that's data
property is an array of Report
s. Note that this differs from .scrapeGradebook
in that individual assignments in a course are not scraped, only the bucket's score.
- user string - the username or Login ID of the student who's grades will be retrieved
- pass string - the password of the student
scraper
Report
An object that contains scores from a specific course over each bucket.
course: 97776 // the five-digit course ID scores: bucket: 'TERM 1' score: 100 bucket: 'TERM 2' score: 98 /* etc */
.scrapeGradebook( user, pass, options )
Fetches and parses user's a gradebook, returning a promise which results in an object that's data property is a Gradebook
.
- user string - the username or Login ID of the student who's gradebook will be retrieved
- pass string - the password of the student
- options object - information identifying which gradebook to scrape
- course number - the five-digit course ID to scrape (e.g. 97776, 97674, etc. )
- bucket string - the term to scrape (e.g. 'TERM 1', 'SEM 1', etc.)
scraper
Gradebook
An object that contains information and assignments about a course at a specific bucket.
course: 'PHYSICS 2 AP' // name of the course instructor: 'Jennifer Smith' // name of the instructor lit: // information about the specific bucket name: 'S1' // bucket's alias begin: '08/20/2018' // bucket's begin date end: '12/20/2018' // bucket's end date period: 1 // course's order in the day score: 995 // score recieved (usually contains a decimal) grade: 100 // score after rounding (always a whole number) gradeAdjustment: 15 // points added to average to get score (null if no adjustment) breakdown: // buckets which make up this bucket's score (null if no breakdown) lit: 'Q2' // bucket's alias score: 955 // score recieved grade: 96 // score after rounding weight: 50 // part that this bucket's score makes up the parent bucket's score (out of 100) lit: 'Q1' grade: 100 score: 100 weight: 50 gradebook: // grade categories which make up this bucket's score category: 'Major' // category title breakdown: // buckets which make up this category (undefined if no breakdown) lit: 'Q2' // bucket's alias weight: 70 // part that this bucket's score makes up this category's score (out of 100) dates: begin: '10/22/2018' // bucket's begin date end: '12/20/2018' // bucket's end date score: 965 // score recieved grade: 97 // score after rounding points: earned: 965 // sum of all assignments' earned points total: 1000 // sum of all assignments' total points /* etc. */ assignments: // assignments which make up this category title: 'TEST IV' score: 100 // score recieved (null if no score) grade: 100 // score after rounding (null if no grade) points: earned: 100 // earned points (null if no earned) total: 100 // total points (null if no total) date: '09/07/18' // date the assignment is/was due meta: // assignment modifiers type: 'absent' // modifier type (e.g. 'absent', 'noCount', or 'missing') note: 'Parent note received within 5d' // extra message /* etc. */ /* etc. */
.scrapeHistory( user, pass )
Fetches and parses user's a academic history, returning a promise which results in an object that's data property is an array of SchoolYear
s.
- user string - the username or Login ID of the student who's academic history will be retrieved
- pass string - the password of the student
scraper
SchoolYear
An object that contins information, courses, and scores from a completed school year
dates: begin: '2018' // school year begin date end: '2019' // school year end date grade: 12 // grade of student during the school year courses: // courses taken during the year course: 'PHYSICS 2 AP' // course name scores: grade: 100 // grade recieved lit: 'S1' // bucket alias /* etc. */ /* etc. */