Copyright | (c) CNRS 2017 |
---|---|
License | AGPL + CECILL v3 |
Maintainer | team@gargantext.org |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data ExternalAPIs
- newtype RawQuery = RawQuery {
- getRawQuery :: Text
- newtype Limit = Limit {}
- data GetCorpusError
- get :: ExternalAPIs -> Lang -> RawQuery -> Maybe APIKey -> Maybe AuthKey -> Text -> Maybe Limit -> IO (Either GetCorpusError (Maybe Integer, ConduitT () HyperdataDocument IO ()))
- externalAPIs :: [ExternalAPIs]
Documentation
data ExternalAPIs #
Main Types TODO IsidoreAuth
Instances
A raw query, as typed by the user from the frontend.
Instances
Arbitrary RawQuery # | |
FromJSON RawQuery # | |
ToJSON RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query | |
IsString RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query fromString :: String -> RawQuery # | |
Show RawQuery # | |
Eq RawQuery # | |
FromHttpApiData RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query parseUrlPiece :: Text -> Either Text RawQuery # parseHeader :: ByteString -> Either Text RawQuery # | |
ToHttpApiData RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query toUrlPiece :: RawQuery -> Text # toEncodedUrlPiece :: RawQuery -> Builder # toHeader :: RawQuery -> ByteString # toQueryParam :: RawQuery -> Text # | |
ToParamSchema RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query toParamSchema :: forall (t :: SwaggerKind Type). Proxy RawQuery -> ParamSchema t # | |
ToSchema RawQuery # | |
Defined in Gargantext.Core.Text.Corpus.Query | |
HasSwagger (WithCustomErrorScheme GargAPI) # | |
Defined in Gargantext.API.Routes |
A limit to the number of results we want to retrieve.
Instances
FromJSON Limit # | |
ToJSON Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query | |
Num Limit # | |
Show Limit # | |
Eq Limit # | |
FromHttpApiData Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query parseUrlPiece :: Text -> Either Text Limit # parseHeader :: ByteString -> Either Text Limit # | |
ToHttpApiData Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query toUrlPiece :: Limit -> Text # toEncodedUrlPiece :: Limit -> Builder # toHeader :: Limit -> ByteString # toQueryParam :: Limit -> Text # | |
ToParamSchema Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query toParamSchema :: forall (t :: SwaggerKind Type). Proxy Limit -> ParamSchema t # | |
ToSchema Limit # | |
Defined in Gargantext.Core.Text.Corpus.Query |
data GetCorpusError #
InvalidInputQuery !RawQuery !Text | We couldn't parse the user input query into something meaningful. |
ExternalAPIError !ExternalAPIs !ClientError | The external service returned an error. |
Instances
Show GetCorpusError # | |
Defined in Gargantext.Core.Text.Corpus.API showsPrec :: Int -> GetCorpusError -> ShowS # show :: GetCorpusError -> String # showList :: [GetCorpusError] -> ShowS # | |
ToHumanFriendlyError GetCorpusError # | |
Defined in Gargantext.Core.Text.Corpus.API mkHumanFriendly :: GetCorpusError -> Text # | |
Eq GetCorpusError # | |
Defined in Gargantext.Core.Text.Corpus.API (==) :: GetCorpusError -> GetCorpusError -> Bool # (/=) :: GetCorpusError -> GetCorpusError -> Bool # |
:: ExternalAPIs | |
-> Lang | A user-selected language in which documents needs to be retrieved.
If the provider doesn't support the search filtered by language, or if the language
is not important, the frontend will simply send |
-> RawQuery | |
-> Maybe APIKey | |
-> Maybe AuthKey | |
-> Text | |
-> Maybe Limit | |
-> IO (Either GetCorpusError (Maybe Integer, ConduitT () HyperdataDocument IO ())) |
Get External API metadata main function
externalAPIs :: [ExternalAPIs] #