Skip to content

Commit

Permalink
Merge branch 'master' of github.com:spgroup/groundhog
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo committed Jul 18, 2013
2 parents 3d8de46 + 3cdf464 commit 6dd9952
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ Injector injector = Guice.createInjector(new SearchModule());
SearchGitHub searchGitHub = injector.getInstance(SearchGitHub.class);

// Search for projects named "opencv" starting in page 1 and stoping and going until the 3rd project
searchGitHub.getProjects("opencv", 1, 3);
List<Project> projects = searchGitHub.getProjects("opencv", 1, 3);
```

Alternatively, you can search for projects without setting the limiting point. In this case Groundhog will fetch projects until your API limit is exceeded.

```java
searchGitHub.getProjects("eclipse", 1, SearchGitHub.INFINITY)
List<Project> projects = searchGitHub.getProjects("eclipse", 1, SearchGitHub.INFINITY)
```

#### Issues
Expand All @@ -61,11 +61,11 @@ User user = new User("joyent"); // Create the User object
Project pr = new Project(user, "node"); // Create the Project object

// Tell Groundhog to fetch all Issues of that project and assign them the the Project object:
pr.setIssues(searchGitHub.getAllProjectIssues(pr));
List<Issue> issues = searchGitHub.getAllProjectIssues(pr);

System.out.println("Listing 'em Issues...");
for (int k = 0; k < pr.getIssues().size(); k++) {
System.out.println(pr.getIssues().get(k).getTitle());
for (Issue issue: issues) {
System.out.println(issue.getTitle());
}
```

Expand All @@ -74,7 +74,7 @@ for (int k = 0; k < pr.getIssues().size(); k++) {
Just like Issues, Groundhog lets you fetch the list of Milestones of a project, too.

```java
pr.setIssues(searchGitHub.getAllProjectMilestones(pr));
List<Milestone> milestones = searchGitHub.getAllProjectMilestones(pr);
```

#### Languages
Expand All @@ -83,7 +83,7 @@ Software projects are often composed of more than one programming language. Grou

```java
// Returns a List of Language objects for each language of project "pr"
searchGitHub.fetchProjectLanguages(pr);
List<Language> languages = searchGitHub.fetchProjectLanguages(pr);
```

#### Contributors
Expand All @@ -94,7 +94,7 @@ You can also get the list of people who contributed to a project on GitHub:
User user = new User("rails");
Project project = new Project(user, "rails"); // project github.com/rails/rails

searchGitHub.getAllProjectContributors(project);
List<User> contributors = searchGitHub.getAllProjectContributors(project);
```

### Running Groundhog
Expand Down Expand Up @@ -134,6 +134,8 @@ $ javadoc -d src/src/groundhog br.cin.ufpe.groundhog

* Fernando Castor {[email protected]}

* Jesus Silva {[email protected]}

## Contributions

Want to contribute with code, documentation or bug report? That's great, check out the [Issues] page.
Expand Down

0 comments on commit 6dd9952

Please sign in to comment.