gitlab_dart 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 48

https://pub.dev/packages/gitlab_dart

Gitlab Dart Client #

A Gitlab API client for dart.

Warning! Still work in progress! #

PR will be much appreciated. #

Usage #

A simple usage example:

import 'package:gitlab_dart/gitlab_dart.dart';

main() {
  var api = GitlabAPI();
  api.getProjectByID(11592997).then((project) {
    print(project.name);
  });
}

0.1.2 #

WIP #

  • Added postData method in [Projects] class.
  • Updated documentations.

0.1.1 #

  • Did some changes as suggested by pub analysis, still WIP

0.1.0 #

  • Initial version, still WIP

example/gitlab_dart_example.dart

import 'package:gitlab_dart/gitlab_dart.dart';

main() {
  var api = GitlabAPI();
  api.getProjectByID(11592997).then((project) {
    print(project.name);
  });
}

Use this package as a library

1. Depend on it

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


dependencies:
  gitlab_dart: ^0.1.2

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

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

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:gitlab_dart/gitlab_dart.dart.

Health suggestions

Fix lib/src/models/projects.dart. (-5.84 points)

Analysis of lib/src/models/projects.dart reported 12 hints, including:

line 39 col 16: Unnecessary new keyword.

line 85 col 17: Unnecessary new keyword.

line 185 col 25: Unnecessary new keyword.

line 186 col 23: Unnecessary new keyword.

line 475 col 15: Unnecessary new keyword.

Fix lib/src/api/projects.dart. (-1 points)

Analysis of lib/src/api/projects.dart reported 2 hints:

line 33 col 30: Unnecessary new keyword.

line 46 col 30: Unnecessary new keyword.

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

Analysis of lib/gitlab_dart.dart reported 1 hint:

line 6 col 8: Unused import: 'package:http/http.dart'.

Fix lib/src/exceptions.dart.

Analysis of lib/src/exceptions.dart reported :

line 0 col 0: is a part and cannot be analyzed.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
http ^0.12.0+2 0.12.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.8.0+1
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test ^1.0.0