Skip to content

Commit

Permalink
Add support for searching issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrik Stenmark committed Jun 5, 2018
1 parent a69870c commit f69cd35
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/tentacat/search.ex
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,19 @@ defmodule Tentacat.Search do
def repositories(client \\ %Client{}, params, options \\ []) do
get("search/repositories", client, params, options)
end

@doc """
Search in issues and pull requests
## Example
Tentacat.Search.issues %{q: "repo:edgurgel/tentacat is:merged", sort: "comments"}
Tentacat.Search.issues client, %{q: "repo:edgurgel/tentacat is:merged", sort: "created"}
More info at: https://developer.github.com/v3/search/#search-issues
"""
@spec issues(Client.t(), any, Keyword.t()) :: Tentacat.response()
def issues(client \\ %Client{}, params, options \\ []) do
get("search/issues", client, params, options)
end
end
Loading

0 comments on commit f69cd35

Please sign in to comment.