View Source GitHub.Search (GitHub REST API Client v0.0.5)

Provides API endpoints related to search

Link to this section Summary

Functions

Search code

Search commits

Search issues and pull requests

Search labels

Search repositories

Search topics

Search users

Link to this section Functions

@spec code(keyword()) :: {:ok, map()} | {:error, GitHub.Error.t()}

Search code

options

Options

  • q (String.t()): The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see Constructing a search query. See "Searching code" for a detailed list of qualifiers.
  • sort (String.t()): Sorts the results of your query. Can only be indexed, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: best match
  • order (String.t()): Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

@spec commits(keyword()) :: {:ok, map()} | {:error, GitHub.Error.t()}

Search commits

options

Options

  • q (String.t()): The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see Constructing a search query. See "Searching commits" for a detailed list of qualifiers.
  • sort (String.t()): Sorts the results of your query by author-date or committer-date. Default: best match
  • order (String.t()): Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

issues_and_pull_requests(opts \\ [])

View Source
@spec issues_and_pull_requests(keyword()) :: {:ok, map()} | {:error, GitHub.Error.t()}

Search issues and pull requests

options

Options

  • q (String.t()): The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see Constructing a search query. See "Searching issues and pull requests" for a detailed list of qualifiers.
  • sort (String.t()): Sorts the results of your query by the number of comments, reactions, reactions-+1, reactions--1, reactions-smile, reactions-thinking_face, reactions-heart, reactions-tada, or interactions. You can also sort results by how recently the items were created or updated, Default: best match
  • order (String.t()): Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

@spec labels(keyword()) :: {:ok, map()} | {:error, GitHub.Error.t()}

Search labels

options

Options

  • repository_id (integer): The id of the repository.
  • q (String.t()): The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see Constructing a search query.
  • sort (String.t()): Sorts the results of your query by when the label was created or updated. Default: best match
  • order (String.t()): Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

@spec repos(keyword()) :: {:ok, map()} | {:error, GitHub.Error.t()}

Search repositories

options

Options

  • q (String.t()): The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see Constructing a search query. See "Searching for repositories" for a detailed list of qualifiers.
  • sort (String.t()): Sorts the results of your query by number of stars, forks, or help-wanted-issues or how recently the items were updated. Default: best match
  • order (String.t()): Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

@spec topics(keyword()) :: {:ok, map()} | {:error, GitHub.Error.t()}

Search topics

options

Options

  • q (String.t()): The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see Constructing a search query.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

@spec users(keyword()) :: {:ok, map()} | {:error, GitHub.Error.t()}

Search users

options

Options

  • q (String.t()): The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see Constructing a search query. See "Searching users" for a detailed list of qualifiers.
  • sort (String.t()): Sorts the results of your query by number of followers or repositories, or when the person joined GitHub. Default: best match
  • order (String.t()): Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources