Skip to content

added request params and headers to user followers calls #648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/Github/Api/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,14 @@ public function orgs()
* @link http://developer.github.com/v3/users/followers/
*
* @param string $username the username
* @param array $parameters parameters for the query string
* @param array $requestHeaders additional headers to set in the request
*
* @return array list of followed users
*/
public function following($username)
public function following($username, array $parameters = [], array $requestHeaders = [])
{
return $this->get('/users/'.rawurlencode($username).'/following');
return $this->get('/users/'.rawurlencode($username).'/following', $parameters, $requestHeaders);
}

/**
Expand All @@ -102,12 +104,14 @@ public function following($username)
* @link http://developer.github.com/v3/users/followers/
*
* @param string $username the username
* @param array $parameters parameters for the query string
* @param array $requestHeaders additional headers to set in the request
*
* @return array list of following users
*/
public function followers($username)
public function followers($username, array $parameters = [], array $requestHeaders = [])
{
return $this->get('/users/'.rawurlencode($username).'/followers');
return $this->get('/users/'.rawurlencode($username).'/followers', $parameters, $requestHeaders);
}

/**
Expand Down