Skip to content

Commit

Permalink
Merge pull request #260 from solomonjames/solomonjames/fixsearch
Browse files Browse the repository at this point in the history
Fixing the search endpoint
  • Loading branch information
pilot committed Apr 7, 2015
2 parents 27b00fc + 5e610d0 commit d2729cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions lib/Github/Api/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Search extends AbstractApi
*/
public function repositories($q, $sort = 'updated', $order = 'desc')
{
return $this->get('/search/repositories', array('q' => $q, 'sort' => $sort, 'order' => $order));
return $this->get('search/repositories', array('q' => $q, 'sort' => $sort, 'order' => $order));
}

/**
Expand All @@ -46,7 +46,7 @@ public function repositories($q, $sort = 'updated', $order = 'desc')
*/
public function issues($q, $sort = 'updated', $order = 'desc')
{
return $this->get('/search/issues', array('q' => $q, 'sort' => $sort, 'order' => $order));
return $this->get('search/issues', array('q' => $q, 'sort' => $sort, 'order' => $order));
}

/**
Expand All @@ -62,7 +62,7 @@ public function issues($q, $sort = 'updated', $order = 'desc')
*/
public function code($q, $sort = 'updated', $order = 'desc')
{
return $this->get('/search/code', array('q' => $q, 'sort' => $sort, 'order' => $order));
return $this->get('search/code', array('q' => $q, 'sort' => $sort, 'order' => $order));
}

/**
Expand All @@ -78,6 +78,6 @@ public function code($q, $sort = 'updated', $order = 'desc')
*/
public function users($q, $sort = 'updated', $order = 'desc')
{
return $this->get('/search/users', array('q' => $q, 'sort' => $sort, 'order' => $order));
return $this->get('search/users', array('q' => $q, 'sort' => $sort, 'order' => $order));
}
}
16 changes: 8 additions & 8 deletions test/Github/Tests/Api/SearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function shouldSearchRepositoriesByQuery()
$api->expects($this->once())
->method('get')
->with(
'/search/repositories',
'search/repositories',
array('q' => 'query text', 'sort' => 'updated', 'order' => 'desc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -36,7 +36,7 @@ public function shouldSearchRepositoriesRegardingSortAndOrder()
$api->expects($this->once())
->method('get')
->with(
'/search/repositories',
'search/repositories',
array('q' => 'query text', 'sort' => 'created', 'order' => 'asc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -59,7 +59,7 @@ public function shouldSearchIssuesByQuery()
$api->expects($this->once())
->method('get')
->with(
'/search/issues',
'search/issues',
array('q' => 'query text', 'sort' => 'updated', 'order' => 'desc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -79,7 +79,7 @@ public function shouldSearchIssuesRegardingSortAndOrder()
$api->expects($this->once())
->method('get')
->with(
'/search/issues',
'search/issues',
array('q' => 'query text', 'sort' => 'created', 'order' => 'asc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -102,7 +102,7 @@ public function shouldSearchCodeByQuery()
$api->expects($this->once())
->method('get')
->with(
'/search/code',
'search/code',
array('q' => 'query text', 'sort' => 'updated', 'order' => 'desc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -122,7 +122,7 @@ public function shouldSearchCodeRegardingSortAndOrder()
$api->expects($this->once())
->method('get')
->with(
'/search/code',
'search/code',
array('q' => 'query text', 'sort' => 'created', 'order' => 'asc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -145,7 +145,7 @@ public function shouldSearchUsersByQuery()
$api->expects($this->once())
->method('get')
->with(
'/search/users',
'search/users',
array('q' => 'query text', 'sort' => 'updated', 'order' => 'desc')
)
->will($this->returnValue($expectedArray));
Expand All @@ -165,7 +165,7 @@ public function shouldSearchUsersRegardingSortAndOrder()
$api->expects($this->once())
->method('get')
->with(
'/search/users',
'search/users',
array('q' => 'query text', 'sort' => 'created', 'order' => 'asc')
)
->will($this->returnValue($expectedArray));
Expand Down

0 comments on commit d2729cf

Please sign in to comment.