File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,36 @@ public function statistics($username, $repository)
8989 return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/stats/contributors ' );
9090 }
9191
92+ /**
93+ * Get a weekly aggregate of the number of additions and deletions pushed to a repository.
94+ *
95+ * @link http://developer.github.com/v3/repos/statistics/#code-frequency
96+ *
97+ * @param string $username the user who owns the repository
98+ * @param string $repository the name of the repository
99+ *
100+ * @return array list of weeks and their commit statistics
101+ */
102+ public function frequency ($ username , $ repository )
103+ {
104+ return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/stats/code_frequency ' );
105+ }
106+
107+ /**
108+ * Get the weekly commit count for the repository owner and everyone else.
109+ *
110+ * @link http://developer.github.com/v3/repos/statistics/#participation
111+ *
112+ * @param string $username the user who owns the repository
113+ * @param string $repository the name of the repository
114+ *
115+ * @return array list of weekly commit count grouped by 'all' and 'owner'
116+ */
117+ public function participation ($ username , $ repository )
118+ {
119+ return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/stats/participation ' );
120+ }
121+
92122 /**
93123 * List all repositories for an organization.
94124 *
You can’t perform that action at this time.
0 commit comments