github 3.0.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 24

GitHub for Dart

This is a Client Library for GitHub in Dart. I wrote this out of necessity, and then when I got a great reaction from the Dart community, I decided to put a lot of effort into it.

Please submit issues and pull requests, join my IRC channel (#directcode on irc.esper.net), help out, or just give me encouragement.

Notice: We are looking for major contributors. Contact us by email or on IRC!

Features

Current

  • Works on the Server and in the Browser
  • Really Fast
  • Plugable API
  • Supports Authentication
  • Builtin OAuth2 Flow
  • Hook Server Helper

Work in Progress

  • Support all the GitHub APIs (Progress: 98%)

Getting Started

First, add the following to your pubspec.yaml:

dependencies:
  github: "^3.0.0"

Then import the library and use it:

For the Server

import 'package:github/server.dart';

void main() {
  /* Creates a GitHub Client */
  var github = createGitHubClient();
  
  github.repositories.getRepository(new RepositorySlug("DirectMyFile", "github.dart")).then((Repository repo) {
    /* Do Something */
  });
}

For the Browser

import 'package:github/browser.dart';

void main() {
  /* Creates a GitHub Client */
  var github = createGitHubClient();
  
  github.repositories.getRepository(new RepositorySlug("DirectMyFile", "github.dart")).then((Repository repo) {
    /* Do Something */
  });
}

Authentication

To use a GitHub token:

var github = createGitHubClient(auth: new Authentication.withToken("YourTokenHere"));

Contacting Us

You can find us on irc.esper.net and irc.freenode.net at #directcode.

v3.0.0

  • BREAKING Removed a number of top-level methods from the public API.
  • BREAKING Removed markdown.dart library – use the markdown package instead.
  • BREAKING Removed the dates.dart library.

v2.3.2

  • Automatically attempt to find GitHub user information in the process environment when running on the standalone VM.
  • Add ref parameter to getReadme method for the repository service.

v2.3.1

  • Cache base64 decoded text property in GitHubFile
  • Fix Bug in EventPoller
  • Added id to Milestone

v2.3.0

  • Moved CHANGELOG content back to repo.
  • Added rateLimitLimit, rateLimitRemaining and rateLimitReset to GitHub.
  • Added id to Issue
  • Added direction, sort and since optional arguments to IssueService.listByRepo.

v2.1.0

NOTICE: This is a major breaking release. This really should have been v2.0.0

  • New Service based API
  • Git Data API Fully Implemented

v2.0.0

  • File class renamed to GitHubFile (Breaking Change)
  • New Integration Tests (Tests the actual GitHub API).
  • Unit Testing System fully setup.
  • Git Data API partially implemented (this is a breaking change because of the new service system).
  • Fixes issues in fetching multiple repositories and users (fetching was very unreliable).
  • Adds a Markdown Rendering Helper (for rendering markdown in an element).
  • Team Membership API Implemented.
  • OAuth2 Flow API now uses some methods in the HTTP Library.
  • Organization Membership Updated to new API Changes.
  • Hook Server performance improvements.
  • Commit JSON Parsing now handles errors correctly.
  • Add Issue.toggleState() method which toggles it from open to closed or vice-versa.
  • Add Issue.isOpen and Issue.isClosed getters.

v1.3.1

  • A few bug fixes.
  • New Tests
  • Benchmarks
  • Markdown Generation Library

v1.3.0

v1.0.1

v1.0.0

v0.6.7

v0.6.6

v0.6.5

v0.6.4

v0.6.3

v0.6.2

v0.6.1

v0.6.0

v0.5.9

All the things!

v0.3.0

v0.2.0

v0.1.0

Initial Version

Use this package as a library

1. Depend on it

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


dependencies:
  github: ^3.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:github/browser.dart';
import 'package:github/server.dart';
  
Version Uploaded Documentation Archive
3.0.2 Jul 12, 2017 Go to the documentation of github 3.0.2 Download github 3.0.2 archive
3.0.0 Aug 29, 2016 Go to the documentation of github 3.0.0 Download github 3.0.0 archive
2.3.1+1 Jan 13, 2016 Go to the documentation of github 2.3.1+1 Download github 2.3.1+1 archive
2.3.1 Dec 4, 2015 Go to the documentation of github 2.3.1 Download github 2.3.1 archive
2.3.0 Oct 3, 2015 Go to the documentation of github 2.3.0 Download github 2.3.0 archive
2.2.3+1 Jun 30, 2015 Go to the documentation of github 2.2.3+1 Download github 2.2.3+1 archive
2.2.3 Jun 29, 2015 Go to the documentation of github 2.2.3 Download github 2.2.3 archive
2.2.2 Apr 16, 2015 Go to the documentation of github 2.2.2 Download github 2.2.2 archive
2.2.1 Apr 12, 2015 Go to the documentation of github 2.2.1 Download github 2.2.1 archive
2.2.0 Apr 12, 2015 Go to the documentation of github 2.2.0 Download github 2.2.0 archive

All 48 versions...

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

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.13.0 <2.0.0