Skip to content

Commit

Permalink
Add API unit test. Remove perPage and page parameters for events method
Browse files Browse the repository at this point in the history
  • Loading branch information
richard015ar committed Apr 21, 2021
1 parent 5534e25 commit c520754
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/Github/Api/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,10 @@ public function publicEvents($username)
*
* @link https://docs.github.com/en/rest/reference/activity#list-events-for-the-authenticated-user
*
* @param string $username
* @param int $page the page number of the paginated result set
* @param int $perPage the number of results per page
*
* @return array
*/
public function events($username, $page = 1, $perPage = 30)
public function events(string $username)
{
return $this->get('/users/'.rawurlencode($username).'/events', [
'page' => $page,
'per_page' => $perPage,
]);
return $this->get('/users/'.rawurlencode($username).'/events');
}
}

0 comments on commit c520754

Please sign in to comment.