module GitHub.Endpoints.Search(
searchRepos',
searchRepos,
searchReposR,
searchCode',
searchCode,
searchCodeR,
searchIssues',
searchIssues,
searchIssuesR,
module GitHub.Data,
) where
import GitHub.Data
import GitHub.Internal.Prelude
import GitHub.Request
import Prelude ()
import qualified Data.Text.Encoding as TE
searchRepos' :: Maybe Auth -> Text -> IO (Either Error (SearchResult Repo))
searchRepos' auth = executeRequestMaybe auth . searchReposR
searchRepos :: Text -> IO (Either Error (SearchResult Repo))
searchRepos = searchRepos' Nothing
searchReposR :: Text -> Request k (SearchResult Repo)
searchReposR searchString =
query ["search", "repositories"] [("q", Just $ TE.encodeUtf8 searchString)]
searchCode' :: Maybe Auth -> Text -> IO (Either Error (SearchResult Code))
searchCode' auth = executeRequestMaybe auth . searchCodeR
searchCode :: Text -> IO (Either Error (SearchResult Code))
searchCode = searchCode' Nothing
searchCodeR :: Text -> Request k (SearchResult Code)
searchCodeR searchString =
query ["search", "code"] [("q", Just $ TE.encodeUtf8 searchString)]
searchIssues' :: Maybe Auth -> Text -> IO (Either Error (SearchResult Issue))
searchIssues' auth = executeRequestMaybe auth . searchIssuesR
searchIssues :: Text -> IO (Either Error (SearchResult Issue))
searchIssues = searchIssues' Nothing
searchIssuesR :: Text -> Request k (SearchResult Issue)
searchIssuesR searchString =
query ["search", "issues"] [("q", Just $ TE.encodeUtf8 searchString)]