module GitHub.Endpoints.Search(
searchReposR,
searchCodeR,
searchIssuesR,
searchUsersR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import Prelude ()
import qualified Data.Text.Encoding as TE
searchReposR :: Text -> Request k (SearchResult Repo)
searchReposR searchString =
query ["search", "repositories"] [("q", Just $ TE.encodeUtf8 searchString)]
searchCodeR :: Text -> Request k (SearchResult Code)
searchCodeR searchString =
query ["search", "code"] [("q", Just $ TE.encodeUtf8 searchString)]
searchIssuesR :: Text -> Request k (SearchResult Issue)
searchIssuesR searchString =
query ["search", "issues"] [("q", Just $ TE.encodeUtf8 searchString)]
searchUsersR :: Text -> Request k (SearchResult SimpleUser)
searchUsersR searchString =
query ["search", "users"] [("q", Just $ TE.encodeUtf8 searchString)]