gitlab 0.4.1

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

GitLab API

This is a dart library to communicate with the GitLab API v4.

This is still work in progress. We are happy about Merge Requests!

This library is already in production use, but it is missing a lot of calls and properties.

The calls that are present should be safe to use.

There are still tests missing for a lot of resources though.

Installation

Simply add it to your project as a dependency:

dependencies:
  gitlab: any

Usage

For the full documentation, and usage, please refer to the documentation.

License

MIT

0.4.1

  • Fix type casting issue in issues.closedByMergeRequest()

0.4.0

  • Rename the Build class to Job in alignment with the GitLab API.
  • Add tests for .list() requests due to regression bug.

0.3.0

  • Make changes for dart 2.0.0 release.

0.2.3

  • Broaden the intl dependency to include 0.15.x

0.2.2

  • Broaden the SDK restriction to include everything up to 2.0.0.

0.2.1

  • Rename merge request get parameter to iid (was id before)

0.2.0

  • Switch to API version v4

0.1.3

  • Add labels to the merge requests
  • Add tests for merge requests

0.1.2

  • Introduce commit.createdAt

0.1.1

  • Add proper testing and refactor code base a bit

0.1.0

First version.

Introduces basic commands and most of the properties of the most important entities

example/example.dart

import 'package:gitlab/gitlab.dart';

const gitLabToken = 'my-secret-token';
const projectId = 123;

void main() async {
  final project = GitLab(gitLabToken).project(projectId);

  // List all commits that have been done in the last 24h
  final commits = await project.commits
      .list(since: new DateTime.now().subtract(new Duration(days: 1)));

  print(commits.first.message);

  /// The internal id of the merge request.
  final iid = 2;
  final mergeRequest = await project.mergeRequests.get(iid);

  print(mergeRequest.title);
}

Use this package as a library

1. Depend on it

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


dependencies:
  gitlab: ^0.4.1

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:gitlab/gitlab.dart';
  
Version Uploaded Documentation Archive
0.4.1 Aug 23, 2018 Go to the documentation of gitlab 0.4.1 Download gitlab 0.4.1 archive
0.4.0 Aug 17, 2018 Go to the documentation of gitlab 0.4.0 Download gitlab 0.4.0 archive
0.3.0 Aug 8, 2018 Go to the documentation of gitlab 0.3.0 Download gitlab 0.3.0 archive
0.2.3 Jul 5, 2017 Go to the documentation of gitlab 0.2.3 Download gitlab 0.2.3 archive
0.2.2 Jun 26, 2017 Go to the documentation of gitlab 0.2.2 Download gitlab 0.2.2 archive
0.2.1 May 2, 2017 Go to the documentation of gitlab 0.2.1 Download gitlab 0.2.1 archive
0.2.0 May 2, 2017 Go to the documentation of gitlab 0.2.0 Download gitlab 0.2.0 archive
0.1.3 Feb 28, 2017 Go to the documentation of gitlab 0.1.3 Download gitlab 0.1.3 archive
0.1.2 Feb 15, 2017 Go to the documentation of gitlab 0.1.2 Download gitlab 0.1.2 archive
0.1.1 Feb 15, 2017 Go to the documentation of gitlab 0.1.1 Download gitlab 0.1.1 archive

All 11 versions...

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

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: Flutter, web, other

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

Health issues and suggestions

Document public APIs (-9.41 points)

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

Maintenance issues and suggestions

Documentation URL is not helpful. (-10 points)

Update the documentation property: create a website about the package or remove it.

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 >=1.21.0 <3.0.0
http ^0.11.2 0.11.3+17 0.12.0
intl ^0.15.6 0.15.7
logging ^0.11.0 0.11.3+2
meta ^1.1.6 1.1.6
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
Dev dependencies
grind_publish ^0.0.4
grinder ^0.8.1
mockito ^3.0.0
path ^1.6.0 1.6.2
test ^1.3.0