Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Add a new parameter includeAutomatedEntry to API getContributionStatics
Browse files Browse the repository at this point in the history
  • Loading branch information
daisy-ycguo committed Oct 30, 2015
1 parent 1c7c3a6 commit cad4cb8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ContainerTranslationStatistics getStatistics(String projectSlug,

@Override
public ContributionStatistics getContributionStatistics(String projectSlug,
String versionSlug, String username, String dateRange) {
String versionSlug, String username, String dateRange, boolean includeAutomatedEntry) {
ContributionStatistics contributionStatistics =
new ContributionStatistics();
LocaleStatistics localeStatistics = new LocaleStatistics();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public ContainerTranslationStatistics getStatistics(String projectSlug,

@Override
public ContributionStatistics getContributionStatistics(String projectSlug,
String versionSlug, String username, String dateRange) {
String versionSlug, String username, String dateRange, boolean includeAutomatedEntry) {
WebResource webResource =
factory.getClient().resource(baseUri).path("stats")
.path("project")
Expand All @@ -104,7 +104,8 @@ public ContributionStatistics getContributionStatistics(String projectSlug,
.path(versionSlug)
.path("contributor")
.path(username)
.path(dateRange);
.path(dateRange)
.queryParam("includeAutomatedEntry", String.valueOf(includeAutomatedEntry));
return webResource.get(ContributionStatistics.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void testGetDocStatistics() {
public void testGetContributorStatistics() {
ContributionStatistics statistics =
client.getContributionStatistics("about-fedora", "master",
"pahuang", "2014-10-01..2014-11-10");
"pahuang", "2014-10-01..2014-11-10",false);
assertThat(statistics, Matchers.hasKey("pahuang"));
}

Expand Down

0 comments on commit cad4cb8

Please sign in to comment.