addu_sis 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 50

AdDU Student Information System Node.js Library #

A Dart library for accessing AdDU Student Information System (SIS) data. This library scrapes data using dio and the http HTML parser. No data is saved when using this library by itself.

Getting Started #

These instructions will get you the library up and running on your local machine for development and testing purposes

Installing #

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

dependencies:
  addu_sis: ^1.0.0

Usage #

Here is an example that:

  1. initializes the SIS library
  2. gets and prints user information
import 'package:addu_sis/addu_sis.dart';

Future<void> main() async {
  var sis = new SIS('username', 'password');
  var user = await sis.getUser();
  // user.card, user.id, user.name, user.course, user.section, user.division, user.year, user.status
}

Getting and printing the grades of the account

var grades = await sis.getGrades();

print(grades.all());

Getting and printing the balance of the account

var balance = await sis.getBalance();

print(balance.all());

Getting and printing the registration of the account

var registration = await sis.getRegistration();

print(registration.all());

Getting and printing all of the subjects in the curriculum of the account

var curriculum = await sis.getCurriculum();

print(curriculum.all());

Searching for currently available classes with class code 4-%

var search = await sis.searchClasses('4-%');

print(search);

Testing #

This package does not come with examples for testing yet.

Versioning #

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors #

See also the list of contributors who participated in this project.

License #

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments #

  • AdDU SIS ;)
  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

1.0.0 #

  • Initial version, directly ported from node-addu-sis

1.0.1 #

  • Remove credentials from example

example/addu_sis_example.dart

import 'package:addu_sis/addu_sis.dart';
void main() async {
  var sis = SIS('username', 'password');
  print((await sis.getUser()).all());
  print((await sis.getCurriculum()).all());
  print((await sis.getRegistration()).all());
  //joe.request('grades').then((value) => print(value['response']));
}

Use this package as a library

1. Depend on it

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


dependencies:
  addu_sis: ^1.0.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:addu_sis/addu_sis.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

We analyzed this package on Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14

Analysis suggestions

Package not compatible with runtime flutter-web on web

Because:

  • package:addu_sis/addu_sis.dart that imports:
  • package:addu_sis/src/SIS.dart that imports:
  • package:cookie_jar/cookie_jar.dart that imports:
  • package:cookie_jar/src/serializable_cookie.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:addu_sis/addu_sis.dart that imports:
  • package:addu_sis/src/SIS.dart that imports:
  • package:cookie_jar/cookie_jar.dart that imports:
  • package:cookie_jar/src/serializable_cookie.dart that imports:
  • dart:io

Health suggestions

Format lib/src/SIS.dart.

Run dartfmt to format lib/src/SIS.dart.

Format lib/src/models/Balance.dart.

Run dartfmt to format lib/src/models/Balance.dart.

Format lib/src/models/Curriculum.dart.

Run dartfmt to format lib/src/models/Curriculum.dart.

Fix additional 5 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/models/Grades.dart (Run dartfmt to format lib/src/models/Grades.dart.)
  • lib/src/models/Registration.dart (Run dartfmt to format lib/src/models/Registration.dart.)
  • lib/src/models/SearchResults.dart (Run dartfmt to format lib/src/models/SearchResults.dart.)
  • lib/src/models/User.dart (Run dartfmt to format lib/src/models/User.dart.)
  • lib/src/utils/tabletomap.dart (Run dartfmt to format lib/src/utils/tabletomap.dart.)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.8.1 <3.0.0
cookie_jar ^1.0.0 1.0.1
dio ^3.0.9 3.0.9
dio_cookie_manager ^1.0.0 1.0.0
html ^0.14.0+3 0.14.0+3
Transitive dependencies
charcode 1.1.3
collection 1.14.13 1.15.0-nullsafety
csslib 0.16.1
http_parser 3.1.4
meta 1.2.2 1.3.0-nullsafety
path 1.7.0
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.2.0 1.3.0-nullsafety
Dev dependencies
pedantic ^1.8.0
test ^1.6.0