123456789_123456789_123456789_123456789_123456789_

Module: Octokit::Client::LegacySearch

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/octokit/client/legacy_search.rb

Overview

Methods for the Legacy Search API

Instance Method Summary

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')

Parameters:

  • repo (String, Repository, Hash)

    A GitHub repository

  • search_term (String)

    The term to search for

  • state (String) (defaults to: 'open')

    :state (open) open or closed.

Returns:

  • (Array<Sawyer::Resource>)

    A list of issues matching the search term and state

[ GitHub ]

  
# 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

Parameters:

  • q (String)

    Search keyword

Returns:

  • (Array<Sawyer::Resource>)

    List of repositories found

See Also:

[ GitHub ]

  
# 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')

Parameters:

Returns:

  • (Array<Sawyer::Resource>)

    Array of hashes representing users.

See Also:

[ GitHub ]

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

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