Skip to content

Commit b565d6d

Browse files
committed
Add list events for an authenticated user method
1 parent 26a838b commit b565d6d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lib/Github/Api/User.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,23 @@ public function publicEvents($username)
234234
{
235235
return $this->get('/users/'.rawurlencode($username).'/events/public');
236236
}
237+
238+
/**
239+
* List events performed by an authenticated user.
240+
*
241+
* @link https://docs.github.com/en/rest/reference/activity#list-events-for-the-authenticated-user
242+
*
243+
* @param string $username
244+
* @param int $page the page number of the paginated result set
245+
* @param int $perPage the number of results per page
246+
*
247+
* @return array
248+
*/
249+
public function events($username, $page = 1, $perPage = 30)
250+
{
251+
return $this->get('/users/'.rawurlencode($username).'/events', [
252+
'page' => $page,
253+
'per_page' => $perPage,
254+
]);
255+
}
237256
}

0 commit comments

Comments
 (0)