Module: Octokit::Client::Search

Included in:
Octokit::Client
Defined in:
lib/octokit/client/search.rb

Overview

Methods for the Search API

Instance Method Summary collapse

Instance Method Details

#search_code(query, options = {}) ⇒ Sawyer::Resource

Search code

Options Hash (options):

  • :sort (String)

    Sort field

  • :order (String)

    Sort order (asc or desc)

  • :page (Fixnum)

    Page of paginated results

  • :per_page (Fixnum)

    Number of items per page

See Also:



19
20
21
# File 'lib/octokit/client/search.rb', line 19

def search_code(query, options = {})
  search "search/code", query, options
end

#search_issues(query, options = {}) ⇒ Sawyer::Resource

Search issues

Options Hash (options):

  • :sort (String)

    Sort field

  • :order (String)

    Sort order (asc or desc)

  • :page (Fixnum)

    Page of paginated results

  • :per_page (Fixnum)

    Number of items per page

See Also:



33
34
35
# File 'lib/octokit/client/search.rb', line 33

def search_issues(query, options = {})
  search "search/issues", query, options
end

#search_repositories(query, options = {}) ⇒ Sawyer::Resource Also known as: search_repos

Search repositories

Options Hash (options):

  • :sort (String)

    Sort field

  • :order (String)

    Sort order (asc or desc)

  • :page (Fixnum)

    Page of paginated results

  • :per_page (Fixnum)

    Number of items per page

See Also:



47
48
49
# File 'lib/octokit/client/search.rb', line 47

def search_repositories(query, options = {})
  search "search/repositories", query, options
end

#search_users(query, options = {}) ⇒ Sawyer::Resource

Search users

Options Hash (options):

  • :sort (String)

    Sort field

  • :order (String)

    Sort order (asc or desc)

  • :page (Fixnum)

    Page of paginated results

  • :per_page (Fixnum)

    Number of items per page

See Also:



62
63
64
# File 'lib/octokit/client/search.rb', line 62

def search_users(query, options = {})
  search "search/users", query, options
end