Skip to content

Commit 9bc5675

Browse files
miscbitsacrobat
authored andcommitted
added request params and headers to user followers calls (#648)
* added request params and headers to user followers calls * used shorthand array syntax * modified abstract api get method to use shorthand array syntax * Revert "modified abstract api get method to use shorthand array syntax" This reverts commit a3416c6. * shorthand syntax for array
1 parent 9bd650e commit 9bc5675

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/Github/Api/User.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,14 @@ public function orgs()
8888
* @link http://developer.github.com/v3/users/followers/
8989
*
9090
* @param string $username the username
91+
* @param array $parameters parameters for the query string
92+
* @param array $requestHeaders additional headers to set in the request
9193
*
9294
* @return array list of followed users
9395
*/
94-
public function following($username)
96+
public function following($username, array $parameters = [], array $requestHeaders = [])
9597
{
96-
return $this->get('/users/'.rawurlencode($username).'/following');
98+
return $this->get('/users/'.rawurlencode($username).'/following', $parameters, $requestHeaders);
9799
}
98100

99101
/**
@@ -102,12 +104,14 @@ public function following($username)
102104
* @link http://developer.github.com/v3/users/followers/
103105
*
104106
* @param string $username the username
107+
* @param array $parameters parameters for the query string
108+
* @param array $requestHeaders additional headers to set in the request
105109
*
106110
* @return array list of following users
107111
*/
108-
public function followers($username)
112+
public function followers($username, array $parameters = [], array $requestHeaders = [])
109113
{
110-
return $this->get('/users/'.rawurlencode($username).'/followers');
114+
return $this->get('/users/'.rawurlencode($username).'/followers', $parameters, $requestHeaders);
111115
}
112116

113117
/**

0 commit comments

Comments
 (0)