skyscrapeapi 2.3.4+1

  • Readme
  • Changelog
  • Example
  • Installing
  • 72

SkyScrapeAPI #

SkyMobile API is the API that was taken from the original SkyMobile app.

SkyMobile API allows easy Skyward access for developers.

Quick Start Guide #

To start, you must have already included skyscrapeapi in your pubspec.yaml file.

Next, you must import the following.

    import 'package:skyscrapeapi/skyscrape.dart';
    import 'package:skyscrapeapi/data_types.dart';

Some of the most important methods you need to know are listed below.

  • getSkywardAuthenticationCodes
  • getGradeBookTerms
  • getGradeBookGrades
  • getAssignmentsFromGradeBox
  • getAssignmentInfoFromAssignment
  • getHistory

These are essential functions that will navigate through Skyward and return SkyScrapeAPI types.

An example of all this code would be located here.

More information can be provided by the documentation generated by flutter.

If you find a bug or have any questions, please contact me at my email: hunter.han@gmail.com

[2.3.4+1] - Code Speed Up

Added a long lost if statement that reduced speed of getting gradebook.

Tests were performed on decent internet.

One action : 7s 645 ms -> 4s 984ms Three actions : 21 s -> 14 s

[2.3.3+1] - Final Bug Fix

Finally fixed all bugs for messages for all districts by searching through all div's.

[2.3.2+2] - More Bug Fix

Fix bug of insertion.

[2.3.2+1] - More Bug Fix

Split's the text and inserts link in there.

[2.3.1+1] - Bug Fix

Fixed bug where there was duplicate links.

[2.3.0+2] - Windows Retarded

Windows RETARDED

[2.3.0+1] - Messages

Added messages retrieval with attachments and hyperlinks.

  • Gets messages from Skyward
  • Retrieves attachments and attempts to keep formatting
  • Moved messages to a new method because of the sheer slowness

[2.2.1+2] - Retrieval of Current User

Retrieve current user

[2.2.1+1] - User Name

Added getting the logged-in user's name.

  • Adds more documentation
  • Makes more variables private for security purposes
  • Refactor of lib/src files to fit dart naming convention

[2.2.0+1] - Parental Account Support

Added support for parent accounts with initializing accounts.

  • Better documentation will be provided later.

[2.1.0+3] - Small addition for maintenance checking

Will return text of the error if maintenance is returned

[2.1.0+1] - Fix Github Retardation

HUGE GLOW-UP (Refactor)

  • Removed duplicate code
  • Moved files around
  • Removed unnecessary code

[2.0.0+2] - Fix Github Retardation

No description needed.

[2.0.0+1] - Server Implementation

Added quick retrieval of assignments in the grade book.

  • Added new data type that allows you to store assignments from the grade book
  • Made for servers
  • Retrieves post-able assignment, grade, and term the grade is from

[1.1.0+3] - Bug Fix

Fixed bug that caused second login to grade book of the same API object would fail.

  • Made Grade Book accessor values non static
  • Made initgradebook return list

[1.1.0+2] - Dev Test

Testing

[1.1.0+1] - Refresh Rate Update

To give the developer more flexibility over skyscrapeapi.

This update gives more power to the developer and allows for developers to relax more.

  • Refresh rates will now affect skyward log-ins
  • The developer can now choose IF they want to refresh skyward authentication automatically
  • Testing files now have settings testSettings.skyTest

[1.0.1+3] - Maintenance Update

Added an example for developers to use in case they do not understand the documentation.

Reformatted all files to fit flutter's requests.

[1.0.1+2] - Organization Update

Minor update for renaming and organizing library stuff.

[1.0.1+1] - Documentation Update

Documentation is now available for developers to view.

[1.0.0+1] - First Official Pub Release

I am confident now in my code and the errors it produces. The API tester code has been finished.

[0.0.1+2] - Rename to Camel Case

Like the title, rename files to Camel Case

[0.0.1] - Initial Release

SkyScrapeAPI is a dart API that allows you to login and pull data from Skyward. SkyScrapeAPI was separated from the original SkyMobile app to allow the API to develop separately from the main app.

SkyScrapeAPI will restart at 0.0.1.

BELOW IS THE OLD CHANGELOG

V1.6.0

  • Allows for error checking

V1.5.4

  • Fixed bug where JSON Saver couldn't save ClassLevel

V1.5.3

  • Removed unnecessary 4.0 GPA Credit attribute

V1.5.2

  • Fixed bug where duplicate SchoolYears were returned.

V1.5.1

  • Modified History Scraper and Data Types to support json saving.

V1.5.0

  • Added History Scraper. Allows you to scrape from sfacademichistory001.w.

V1.4.1

  • Adressed major bug which prevented users from Highland Park ISD from logging in. This should fix logging in bugs for all districts with wsEAplus in their url link name.

V1.4.0

  • Remade Assignment scraping algorithm to support more districts.

V1.3.0

  • Adds DistrictSearcher to search for districts family access links.

V1.2.1

  • Fixed bug where assignments with the same name would display the same details: THIS BUG AFFECTS SKYMOBILE iOS AND WILL NOT BE FIXED FOR SKYMOBILE iOS

V1.2.0

  • Can scrape assignment details.

V1.0.0

  • Build the basic foundation. Initial release.
  • Can scrape gradebook and assignments.

example/main.dart

import 'package:skyscrapeapi/skyscrape.dart';
import 'package:skyscrapeapi/data_types.dart';
import 'dart:io';

void main() async {
  final skyward = SkywardAPICore(
      "https://skyward-fbprod.iscorp.com/scripts/wsisa.dll/WService=wsedufortbendtx/seplog01.w");
  var file = File('test/testCredentials.txt');
  var contents;
  var terms;
  var gradeBook;
  var assignment;

  int indexOfTestingGradeBook = 1;
  int indexOfTestingAssignment = 4;

  if (await file.exists()) {
    contents = await file.readAsString();
    List split = contents.toString().split('\n');

    if (!await skyward.getSkywardAuthenticationCodes(split[0], split[1])) {
      throw SkywardError('OH POOP WE FAIL TO LOG IN PLZ FIX BUG');
    }
  }

  try {
    terms = (await skyward.getGradeBookTerms());
  } catch (e) {
    print('Should not fail: ' + e);
    throw SkywardError('SHOULD SUCCEED');
  }

  try {
    gradeBook = await skyward.getGradeBookGrades(terms);
  } catch (e) {
    print('Should not fail: ' + e.toString());
    throw SkywardError('SHOULD SUCCEED');
  }

  try {
    assignment = (await skyward.getAssignmentsFromGradeBox(gradeBook[indexOfTestingGradeBook]));
  } catch (e) {
    print('Should succeed: ${e.toString()}');
    throw SkywardError('SHOULD SUCCEED');
  }

  try {
    print(await skyward.getAssignmentInfoFromAssignment(assignment[indexOfTestingAssignment]));
  } catch (e) {
    print('Should succeed: ${e.toString()}');
    throw SkywardError('SHOULD SUCCEED');
  }

  try {
    print(await skyward.getHistory());
  } catch (e) {
    print('Should succeed: ${e.toString()}');
    throw SkywardError('SHOULD SUCCEED');
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  skyscrapeapi: ^2.3.4+1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:skyscrapeapi/data_types.dart';
import 'package:skyscrapeapi/district_searcher.dart';
import 'package:skyscrapeapi/sky_core.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
51
Health:
Code health derived from static analysis. [more]
87
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
72
Learn more about scoring.

We analyzed this package on Dec 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.13.1+4

Health suggestions

Fix lib/sky_core.dart. (-4.89 points)

Analysis of lib/sky_core.dart reported 10 hints, including:

line 61 col 7: DO use curly braces for all flow control structures.

line 67 col 7: DO use curly braces for all flow control structures.

line 98 col 7: DO use curly braces for all flow control structures.

line 138 col 26: Use isNotEmpty instead of length

line 145 col 9: Use isNotEmpty instead of length

Fix lib/src/message.dart. (-2.96 points)

Analysis of lib/src/message.dart reported 6 hints, including:

line 38 col 14: Use isNotEmpty instead of length

line 50 col 13: Use isNotEmpty instead of length

line 57 col 17: DO use curly braces for all flow control structures.

line 59 col 17: DO use curly braces for all flow control structures.

line 84 col 11: Use isEmpty instead of length

Fix lib/src/skyward_utils.dart. (-1.49 points)

Analysis of lib/src/skyward_utils.dart reported 3 hints:

line 12 col 5: DO use curly braces for all flow control structures.

line 14 col 5: DO use curly braces for all flow control structures.

line 22 col 7: Use isNotEmpty instead of length

Fix additional 5 files with analysis or formatting issues. (-4 points)

Additional issues in the following files:

  • lib/data_types.dart (2 hints)
  • lib/district_searcher.dart (2 hints)
  • lib/src/assignment.dart (2 hints)
  • lib/src/gradebook.dart (1 hint)
  • lib/src/history.dart (1 hint)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <3.0.0
html ^0.14.0+2 0.14.0+3
http ^0.12.0+2 0.12.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
csslib 0.16.1
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test ^1.8.0