Skip to content

Commit

Permalink
Added pagination to project search. Fixes #58
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Humphrey committed Feb 18, 2015
1 parent ea7c36f commit 94936ce
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/Gitlab/Api/Projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ public function owned($page = 1, $per_page = self::PER_PAGE)
));
}

public function search($query, $page = 1, $per_page = self::PER_PAGE)
{
return $this->get('projects/search/'.urlencode($query), array(
'page' => $page,
'per_page' => $per_page
));
}

public function show($project_id)
{
return $this->get('projects/'.urlencode($project_id));
Expand Down Expand Up @@ -185,11 +193,6 @@ public function removeLabel($project_id, array $params)
return $this->delete('projects/'.urlencode($project_id).'/labels', $params);
}

public function search($query)
{
return $this->get('projects/search/'.urlencode($query));
}

public function createForkRelation($project_id, $forked_project_id)
{
return $this->post('projects/'.urlencode($project_id).'/fork/'.urlencode($forked_project_id));
Expand Down

0 comments on commit 94936ce

Please sign in to comment.