mashov_api 0.5.1

Mashov Api #

...What is this thing? #

The Mashov (students) API - for flutter.

Where do I get started? #

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!


...Are there any docs? #

Well, the code is pretty well documented. If you have any issues, post a new issue.

0.0.1 #

  • Initial commit

0.0.2 #

  • Fixed unhandled exception on login

0.0.3 #

  • Added Bagrut grades and Hatamot APIs.

0.0.4 #

  • Added Api enum and Data Processor to Api Controller.

0.0.5 #

  • Put all models file in one file, and by doing this exported another two models that were not exported in version 0.0.4

0.0.6 #

  • Added statusCode to Login, and some nice getters such as isUnauthorized.

0.0.7 #

  • Moved status Code from Login to Result, added isOk getter, added status code to all requests.

0.0.8 #

  • Fixed Api controller passing Future<Result

0.0.9 #

  • Added raw data processor, allowing the processing of the JSON data itself, and not the parsed objects.
  • Removed as it is pretty much useless.

0.0.10 #

  • Updated timetable API

0.0.11 - 0.0.13 #

  • Messed up and fixed students API

0.1.0 #

  • Fixed messages count and get message not working because of implicit type conversions

0.3.0 #

  • Moved bagrut grades into a bigger model called Bagrut which includes time, date and room too. Bagrut grades will no longer pass through raw data processor, as they require two different requests. They will still pass through the data processor.
  • Added a changelog.

0.3.0+1 #

  • Updated API version

0.3.0+2 #

  • Added Hatamot Bagrut.

0.3.0+3 #

  • Added Bells.

0.4.0 #

Breaking changes - Lesson is now combined with Bell.

0.5.0 #

Fixed contacts API

0.5.1 #

Fixed it once again

Use this package as a library

1. Depend on it

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

  mashov_api: ^0.5.1

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support 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:mashov_api/mashov_api.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/src/models.dart. (-1 points)

Analysis of lib/src/models.dart reported 2 hints:

line 406 col 40: Avoid using braces in interpolation when not needed.

line 406 col 53: Avoid using braces in interpolation when not needed.

Format lib/src/controller/api_controller.dart.

Run flutter format to format lib/src/controller/api_controller.dart.

Format lib/src/controller/request_controller_impl.dart.

Run flutter format to format lib/src/controller/request_controller_impl.dart.

Format lib/src/utils.dart.

Run flutter format to format lib/src/utils.dart.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and mashov_api.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


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+2 0.12.0+2
Transitive dependencies
async 2.3.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.6 1.1.7
path 1.6.4
pedantic 1.8.0+1
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8