Skip to content

Commit

Permalink
Issues: Add Support for State
Browse files Browse the repository at this point in the history
  • Loading branch information
azenla committed Aug 30, 2014
1 parent e239e1a commit 571bb41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/src/common/github.dart
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ class GitHub {
/**
* Fetches Issues for a Repository
*/
Stream<Issue> issues(RepositorySlug slug) {
return new PaginationHelper(this).objects("GET", "/repos/${slug.fullName}/issues", Issue.fromJSON);
Stream<Issue> issues(RepositorySlug slug, {String state: "open"}) {
return new PaginationHelper(this).objects("GET", "/repos/${slug.fullName}/issues", params: {"state": state}, Issue.fromJSON);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/src/common/repo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class Repository extends GitHubObject with GitHubUrlProvider implements Provides
*
* [limit] is the number of issues to get
*/
Stream<Issue> issues() => github.issues(slug());
Stream<Issue> issues({String state: "open"}) => github.issues(slug(), state: state);

/**
* Gets the Repository Commits
Expand Down

0 comments on commit 571bb41

Please sign in to comment.