skyscrapeapi 1.1.1+2 icon indicating copy to clipboard operation
skyscrapeapi: ^1.1.1+2 copied to clipboard

outdated

SkyMobile API is the API that was taken from the original SkyMobile app. SkyMobile API allows easy Skyward access for developers.

example/main.dart

import 'package:skyscrapeapi/skywardAPICore.dart';
import 'package:skyscrapeapi/skywardUniversal.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');
  }
}
2
likes
0
pub points
24%
popularity

Publisher

shield icon for verified publishersclearhall.dev

SkyMobile API is the API that was taken from the original SkyMobile app. SkyMobile API allows easy Skyward access for developers.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, html, http

More

Packages that depend on skyscrapeapi