Skip to content

SkySecureX/skyward-rest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skyward REST

license Build Status

Installation

npm install https://github.com/FruitsNVeggies/skyward-rest

Summary

Unofficial Rest API for Skyward

  • Uses Puppeteer
  • Queries data for the fastest output
  • Breaks down and parses complex responses
  • Handles edge cases with ease
  • Built functionally

Examples

Basics

const skyward = require('skyward-rest')

const url = 'https://skyward.coolisd.net/...'

skyward(url)(userId, password)
  .then(student => {
    student.scrape('S1')
      .then(console.log) // => [Object Array]
      .then(() => student.close())
  })

.scrape() multiple times within the same session

skyward(url)(userId, password)
  .then(student => {
    student.scrape('PR3')
      .then(console.log) // => [Array of Sizeable Objects]
      .then(() => student.scrape('Q2'))
      .then(console.log) // => [Array of Bigger Objects]
      .then(() => student.scrape('S2'))
      .then(console.log) // => [Array of Enormous Objects]
      .then(() => student.close())
  })

API

Scraper factory

Curried function which returns a Promise which resolves into a Scraper. It first accepts the URL to the login page of the specific ISD's Skyward domain. Note that the URL should not redirect.

skyward('https://skyward.coolisd.net/scripts/wsisa.dll/WService=wsEAplus/seplog01.w')(userId, password)
// => Promise { <pending> } then Scraper

The Promise resolves once the scraper navigates to the gradebook.

Scraper functions

Functions to control the Scraper.

.scrape( lit )

Function to scrape data from a particular lit which returns a Promise that resolves into an Object Array.

student.scrape('PR4')
// => Promise { <pending> } then [Array]

.close()

Closes the scraper and exits Puppeteer. This function is imperative in order to save computer resources.

About

Unofficial Rest API for Skyward

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%