@@ -39,19 +39,33 @@ public function find($keyword, array $params = array())
39
39
}
40
40
41
41
/**
42
- * Get contributor commit statistics for a repository
43
- * @link http://developer.github.com/v3/repos/statistics/#contributors
42
+ * Get the last year of commit activity for a repository grouped by week
43
+ * @link http://developer.github.com/v3/repos/statistics/#commit-activity
44
44
*
45
45
* @param string $username the user who owns the repository
46
46
* @param string $repository the name of the repository
47
47
*
48
- * @return array list of contributors and their commit statistics
48
+ * @return array commit activity grouped by week
49
49
*/
50
- public function statistics ($ username , $ repository )
50
+ public function activity ($ username , $ repository )
51
51
{
52
- return $ this ->get ('repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/stats/contributors ' );
52
+ return $ this ->get ('repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/stats/commit_activity ' );
53
53
}
54
54
55
+ /**
56
+ * Get contributor commit statistics for a repository
57
+ * @link http://developer.github.com/v3/repos/statistics/#contributors
58
+ *
59
+ * @param string $username the user who owns the repository
60
+ * @param string $repository the name of the repository
61
+ *
62
+ * @return array list of contributors and their commit statistics
63
+ */
64
+ public function statistics ($ username , $ repository )
65
+ {
66
+ return $ this ->get ('repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/stats/contributors ' );
67
+ }
68
+
55
69
/**
56
70
* List all repositories for an organization
57
71
* @link http://developer.github.com/v3/repos/#list-organization-repositories
0 commit comments