Skip to content

Commit

Permalink
Add project_search method
Browse files Browse the repository at this point in the history
  • Loading branch information
ey3ball committed Feb 25, 2015
1 parent d0ebd3b commit cea19b8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/gitlab/client/projects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ def projects(options={})
end
end

# Search for projects by name
#
# @example
# Gitlab.project_search('gitlab')
# Gitlab.project_search('gitlab', :order_by => 'last_activity_at')
#
# @param [Hash] options A customizable set of options.
# @option options [String] :per_page Number of projects to return per page
# @option options [String] :page The page to retrieve
# @option options [String] :order_by Return requests ordered by id, name, created_at or last_activity_at fields
# @option options [String] :sort Return requests sorted in asc or desc order
# @return [Array<Gitlab::ObjectifiedHash>]
def project_search(query, options={})
get("/projects/search/#{query}", :query => options)
end


# Gets information about a project.
#
# @example
Expand Down

0 comments on commit cea19b8

Please sign in to comment.