librus_api 1.0.21

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new65

A library for Dart developers.

Created from templates made available by Stagehand under a BSD-style license.

Usage

A simple usage example:

import 'package:librus_api/librus_api.dart';

main() {
  var awesome = new Awesome();
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

1.0.0

  • Initial version, created by Stagehand

example/librus_api_example.dart

import 'dart:convert';
import 'dart:io';

import 'package:librus_api/librus_api.dart';
import 'package:librus_api/librus_api_base.dart';
import 'package:librus_api/models/grade.dart';
import 'package:librus_api/utils/utils.dart';

main() async {
  LibrusApi.init();
  var api = LibrusApi('./cookies');
  await api.signIn(Platform.environment['LIBRUS_USERNAME'],
      Platform.environment['LIBRUS_PASSWORD']);
  print(await api.refresh());
  var accounts = await api.accounts;
  await accounts[0].refresh();
  var data = json.encode(api);
  print(json.decode(data));
  print(json.encode(await fetchSubjects(accounts[0])));
}

Use this package as a library

1. Depend on it

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


dependencies:
  librus_api: ^1.0.21

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:librus_api/librus_api.dart';
  
Version Uploaded Documentation Archive
1.0.21 Jan 20, 2019 Go to the documentation of librus_api 1.0.21 Download librus_api 1.0.21 archive
1.0.20 Jan 20, 2019 Go to the documentation of librus_api 1.0.20 Download librus_api 1.0.20 archive
1.0.19 Jan 16, 2019 Go to the documentation of librus_api 1.0.19 Download librus_api 1.0.19 archive
1.0.18 Jan 16, 2019 Go to the documentation of librus_api 1.0.18 Download librus_api 1.0.18 archive
1.0.17 Jan 15, 2019 Go to the documentation of librus_api 1.0.17 Download librus_api 1.0.17 archive
1.0.16 Jan 15, 2019 Go to the documentation of librus_api 1.0.16 Download librus_api 1.0.16 archive
1.0.15 Jan 15, 2019 Go to the documentation of librus_api 1.0.15 Download librus_api 1.0.15 archive
1.0.14 Jan 15, 2019 Go to the documentation of librus_api 1.0.14 Download librus_api 1.0.14 archive
1.0.13 Jan 15, 2019 Go to the documentation of librus_api 1.0.13 Download librus_api 1.0.13 archive
1.0.12 Jan 15, 2019 Go to the documentation of librus_api 1.0.12 Download librus_api 1.0.12 archive

All 22 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
47
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
65
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.10

Platforms

Detected platforms: Flutter, other

Primary library: package:librus_api/librus_api.dart with components: io.

Health issues and suggestions

Document public APIs. (-1 points)

187 out of 187 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Fix lib/account.g.dart. (-1 points)

Analysis of lib/account.g.dart reported 2 hints:

line 9 col 9: The function '_$AccountFromJson' isn't used.

line 25 col 22: The function '_$AccountToJson' isn't used.

Fix lib/account.dart. (-0.50 points)

Analysis of lib/account.dart reported 1 hint:

line 41 col 28: The value of the local variable 'result' isn't used.

Fix lib/librus_api_base.dart. (-0.50 points)

Analysis of lib/librus_api_base.dart reported 1 hint:

line 7 col 8: Unused import: 'package:json_annotation/json_annotation.dart'.

Fix additional 10 files with analysis or formatting issues. (-0.50 points)

Additional issues in the following files:

  • lib/models/resource.dart (1 hint)
  • lib/account.reflectable.dart (Run dartfmt to format lib/account.reflectable.dart.)
  • lib/misc/activator.reflectable.dart (Run dartfmt to format lib/misc/activator.reflectable.dart.)
  • lib/models/category.reflectable.dart (Run dartfmt to format lib/models/category.reflectable.dart.)
  • lib/models/comment.reflectable.dart (Run dartfmt to format lib/models/comment.reflectable.dart.)
  • lib/models/grade.reflectable.dart (Run dartfmt to format lib/models/grade.reflectable.dart.)
  • lib/models/resource.reflectable.dart (Run dartfmt to format lib/models/resource.reflectable.dart.)
  • lib/models/serializable.reflectable.dart (Run dartfmt to format lib/models/serializable.reflectable.dart.)
  • lib/models/subject.reflectable.dart (Run dartfmt to format lib/models/subject.reflectable.dart.)
  • lib/utils/utils.reflectable.dart (Run dartfmt to format lib/utils/utils.reflectable.dart.)

Maintenance issues and suggestions

Homepage URL does not exists. (-20 points)

We were unable to access https://github.com/MatisiekPL/librus-api-dart/ at the time of the analysis.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
cookie_jar ^0.0.7 0.0.7
dio ^1.0.13 1.0.13
html ^0.13.3+3 0.13.3+3
http ^0.12.0 0.12.0+1
json_serializable ^2.0.1 2.0.1
reflectable ^2.0.8 2.0.9
Transitive dependencies
analyzer 0.34.2
args 1.5.1
async 2.0.8
build 1.1.0
build_config 0.3.1+4
build_resolvers 0.2.3
build_runner_core 1.1.3
built_collection 4.1.0
built_value 6.2.0
charcode 1.1.2
code_builder 3.1.3
collection 1.14.11
convert 2.1.1
crypto 2.0.6
csslib 0.14.6
dart_style 1.2.2
fixnum 0.10.9
front_end 0.1.9
glob 1.1.7
graphs 0.2.0
http_multi_server 2.0.5
http_parser 3.1.3
io 0.3.3
js 0.6.1+1
json_annotation 2.0.0
kernel 0.3.9
logging 0.11.3+2
matcher 0.12.4
meta 1.1.7
mime 0.9.6+2
package_config 1.0.5
package_resolver 1.0.6
path 1.6.2
pedantic 1.4.0
plugin 0.2.0+3
pool 1.4.0
pub_semver 1.4.2
pubspec_parse 0.1.4
quiver 2.0.1
shelf 0.7.4
shelf_web_socket 0.2.2+4
source_gen 0.9.4
source_span 1.4.1 1.5.2
stack_trace 1.9.3
stream_channel 1.6.8
stream_transform 0.0.14+1
string_scanner 1.0.4
timing 0.1.1+1
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
web_socket_channel 1.0.9
yaml 2.1.15
Dev dependencies
build_runner any 1.1.3
test ^1.0.0