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 @@ -88,6 +88,36 @@ public function statistics($username, $repository)
88
88
return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/stats/contributors ' );
89
89
}
90
90
91
+ /**
92
+ * Get a weekly aggregate of the number of additions and deletions pushed to a repository.
93
+ *
94
+ * @link http://developer.github.com/v3/repos/statistics/#code-frequency
95
+ *
96
+ * @param string $username the user who owns the repository
97
+ * @param string $repository the name of the repository
98
+ *
99
+ * @return array list of weeks and their commit statistics
100
+ */
101
+ public function frequency ($ username , $ repository )
102
+ {
103
+ return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/stats/code_frequency ' );
104
+ }
105
+
106
+ /**
107
+ * Get the weekly commit count for the repository owner and everyone else.
108
+ *
109
+ * @link http://developer.github.com/v3/repos/statistics/#participation
110
+ *
111
+ * @param string $username the user who owns the repository
112
+ * @param string $repository the name of the repository
113
+ *
114
+ * @return array list of weekly commit count grouped by 'all' and 'owner'
115
+ */
116
+ public function participation ($ username , $ repository )
117
+ {
118
+ return $ this ->get ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/stats/participation ' );
119
+ }
120
+
91
121
/**
92
122
* List all repositories for an organization.
93
123
*
You can’t perform that action at this time.
0 commit comments