mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-23 15:50:48 +00:00
Rename methods for better clarity
This commit is contained in:
@@ -87,7 +87,7 @@ public class GHRepositoryStatistics {
|
||||
* This gets the actual statistics from the server. Returns null if they are still being cached.
|
||||
*/
|
||||
private PagedIterable<ContributorStats> getContributorStatsImpl() throws IOException {
|
||||
return root.retrieve()
|
||||
return root.createRequest()
|
||||
.asPagedIterable(getApiTailUrl("contributors"), ContributorStats[].class, item -> item.wrapUp(root));
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ public class GHRepositoryStatistics {
|
||||
* the io exception
|
||||
*/
|
||||
public PagedIterable<CommitActivity> getCommitActivity() throws IOException {
|
||||
return root.retrieve()
|
||||
return root.createRequest()
|
||||
.asPagedIterable(getApiTailUrl("commit_activity"), CommitActivity[].class, item -> item.wrapUp(root));
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ public class GHRepositoryStatistics {
|
||||
// Map to ArrayLists first, since there are no field names in the
|
||||
// returned JSON.
|
||||
try {
|
||||
InputStream stream = root.retrieve().withUrlPath(getApiTailUrl("code_frequency")).toStream();
|
||||
InputStream stream = root.createRequest().withUrlPath(getApiTailUrl("code_frequency")).fetchStream();
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
TypeReference<ArrayList<ArrayList<Integer>>> typeRef = new TypeReference<ArrayList<ArrayList<Integer>>>() {
|
||||
@@ -400,7 +400,7 @@ public class GHRepositoryStatistics {
|
||||
* the io exception
|
||||
*/
|
||||
public Participation getParticipation() throws IOException {
|
||||
return root.retrieve().withUrlPath(getApiTailUrl("participation")).to(Participation.class);
|
||||
return root.createRequest().withUrlPath(getApiTailUrl("participation")).fetch(Participation.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -460,7 +460,7 @@ public class GHRepositoryStatistics {
|
||||
public List<PunchCardItem> getPunchCard() throws IOException {
|
||||
// Map to ArrayLists first, since there are no field names in the
|
||||
// returned JSON.
|
||||
InputStream stream = root.retrieve().withUrlPath(getApiTailUrl("punch_card")).toStream();
|
||||
InputStream stream = root.createRequest().withUrlPath(getApiTailUrl("punch_card")).fetchStream();
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
TypeReference<ArrayList<ArrayList<Integer>>> typeRef = new TypeReference<ArrayList<ArrayList<Integer>>>() {
|
||||
|
||||
Reference in New Issue
Block a user