Permalink
Browse files

Fixes #8 - support for pagination parameters

  • Loading branch information...
1 parent 3409830 commit d6274c0896e02d633038eba030be5be9703a172b @martinbean committed Dec 31, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/dribbble.php
View
@@ -184,15 +184,18 @@ public function get_player_draftees($id)
*
* @param string $url
* @param string $method
- * @param array $options
+ * @param array $params
* @return object
* @throws DribbbleException
*/
- protected function makeRequest($url, $method = 'GET', $options = array())
+ protected function makeRequest($url, $method = 'GET', $params = array())
{
$ch = curl_init();
$options = self::$CURL_OPTS;
$options[CURLOPT_URL] = $this->endpoint . $url;
+ if (!empty($params)) {
+ $options[CURLOPT_URL].= '?'.http_build_query($params, null, '&');
+ }
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
if ($result === false) {

0 comments on commit d6274c0

Please sign in to comment.