Module: Octokit::Client::LegacySearch

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

Overview

Methods for the Legacy Search API

Instance Method Summary collapse

Instance Method Details

#legacy_search_issues(repo, search_term, state = 'open', options = {}) ⇒ Array<Sawyer::Resource>

Legacy search issues within a repository

Examples:

Search for 'test' in the open issues for sferik/rails_admin

Octokit.search_issues("sferik/rails_admin", 'test', 'open')

26
27
28
# File 'lib/octokit/client/legacy_search.rb', line 26

def legacy_search_issues(repo, search_term, state='open', options = {})
  get("legacy/issues/search/#{Repository.new(repo)}/#{state}/#{search_term}", options)['issues']
end

#legacy_search_repositories(q, options = {}) ⇒ Array<Sawyer::Resource>

Legacy repository search


14
15
16
# File 'lib/octokit/client/legacy_search.rb', line 14

def legacy_search_repositories(q, options = {})
  get("legacy/repos/search/#{q}", options)['repositories']
end

#legacy_search_users(search, options = {}) ⇒ Array<Sawyer::Resource>

Search for user.

Examples:

Octokit.search_users('pengwynn')

See Also:


37
38
39
# File 'lib/octokit/client/legacy_search.rb', line 37

def legacy_search_users(search, options = {})
  get("legacy/user/search/#{search}", options)['users']
end