The Mashov (students) API - for flutter.
First of all, get yourself a nice Api Controller
to your code:
var controller = MashovApi.getController();
Next, get the list of schools:
var schoolsResult = await controller.getSchools();
if(schoolsResult.isSucess) {
var schools = schoolsResult.value;
}
Now, you can pick your school and log in with it:
await controller.login(mySchool, myId, mySecretPassword, year)
Once you log in successfully... You can do whatever you want!
controller.getGrades();
controller.getBehaveEvents();
....
Well, the code is pretty well documented. If you have any issues, post a new issue.
Initial commit
Fixed unhandled exception on login
Added Bagrut grades and Hatamot APIs.
Added Api enum and Data Processor to Api Controller.
Put all models file in one file, and by doing this exported another two models that were not exported in version 0.0.4
Added statusCode to Login, and some nice getters such as isUnauthorized.
example/README.md
Demonstrates how to use the mashov_api plugin.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Add this to your package's pubspec.yaml file:
dependencies:
mashov_api: ^0.0.8
You can install packages from the command line:
with Flutter:
$ flutter packages get
Alternatively, your editor might support flutter packages get
.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:mashov_api/mashov_api.dart';
Version | Uploaded | Documentation | Archive |
---|---|---|---|
0.0.8 | Feb 6, 2019 |
|
|
0.0.7 | Feb 4, 2019 |
|
|
0.0.6 | Feb 3, 2019 |
|
|
0.0.5 | Feb 3, 2019 |
|
|
0.0.4 | Feb 2, 2019 |
|
|
0.0.3 | Feb 2, 2019 |
|
|
0.0.2 | Jan 27, 2019 |
|
|
0.0.1 | Jan 21, 2019 |
|
|
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
26
|
Health:
Code health derived from static analysis.
[more]
|
86
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
70
|
Overall:
Weighted score of the above.
[more]
|
53
|
We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Fix lib/src/controller/api_controller.dart
. (-9.54 points)
Analysis of lib/src/controller/api_controller.dart
reported 20 hints, including:
line 35 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.
line 39 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.
line 77 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.
line 82 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.
line 88 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.
Fix lib/src/controller/cookie_manager_impl.dart
. (-1.49 points)
Analysis of lib/src/controller/cookie_manager_impl.dart
reported 3 hints:
line 6 col 10: Field doesn't override an inherited getter or setter.
line 16 col 10: Field doesn't override an inherited getter or setter.
line 26 col 10: Field doesn't override an inherited getter or setter.
Fix lib/src/controller/request_controller.dart
. (-1 points)
Analysis of lib/src/controller/request_controller.dart
reported 2 hints:
line 8 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.
line 11 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.
Fix additional 5 files with analysis or formatting issues. (-2 points)
Additional issues in the following files:
lib/src/controller/request_controller_impl.dart
(2 hints)lib/src/models.dart
(1 hint)lib/src/utils.dart
(1 hint)lib/mashov_api.dart
(Run flutter format
to format lib/mashov_api.dart
.)lib/src/controller/cookie_manager.dart
(Run flutter format
to format lib/src/controller/cookie_manager.dart
.)The package description is too short. (-20 points)
Add more detail to the description
field of pubspec.yaml
. Use 60 to 180 characters to describe the package, what it does, and its target use case.
Package is pre-v0.1 release. (-10 points)
While nothing is inherently wrong with versions of 0.0.*
, it might mean that the author is still experimenting with the general direction of the API.
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.0.0-dev.68.0 <3.0.0 | ||
flutter | 0.0.0 | ||
http | ^0.12.0+1 | 0.12.0+1 | |
Transitive dependencies | |||
async | 2.0.8 | ||
charcode | 1.1.2 | ||
collection | 1.14.11 | ||
http_parser | 3.1.3 | ||
meta | 1.1.6 | 1.1.7 | |
path | 1.6.2 | ||
sky_engine | 0.0.99 | ||
source_span | 1.5.4 | ||
string_scanner | 1.0.4 | ||
term_glyph | 1.1.0 | ||
typed_data | 1.1.6 | ||
vector_math | 2.0.8 |