Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
haskell-gargantext
Commits
78e599d1
Commit
78e599d1
authored
May 14, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WIP] API upload, need ToSchema and Arbitrary instances.
parent
23e8378f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
20 deletions
+5
-20
API.hs
src/Gargantext/API.hs
+4
-0
Node.hs
src/Gargantext/API/Node.hs
+1
-20
No files found.
src/Gargantext/API.hs
View file @
78e599d1
...
@@ -75,6 +75,7 @@ import Gargantext.API.Ngrams (HasRepo(..), HasRepoSaver(..), saveRepo, ApiNgrams
...
@@ -75,6 +75,7 @@ import Gargantext.API.Ngrams (HasRepo(..), HasRepoSaver(..), saveRepo, ApiNgrams
import
Gargantext.API.Node
import
Gargantext.API.Node
import
Gargantext.API.Search
(
SearchAPI
,
search
,
SearchQuery
)
import
Gargantext.API.Search
(
SearchAPI
,
search
,
SearchQuery
)
import
Gargantext.API.Types
import
Gargantext.API.Types
import
Gargantext.API.Upload
import
Gargantext.Core.Types
(
HasInvalidError
(
..
))
import
Gargantext.Core.Types
(
HasInvalidError
(
..
))
import
Gargantext.Database.Facet
import
Gargantext.Database.Facet
import
Gargantext.Database.Schema.Node
(
HasNodeError
(
..
),
NodeError
)
import
Gargantext.Database.Schema.Node
(
HasNodeError
(
..
),
NodeError
)
...
@@ -278,6 +279,8 @@ type GargAPI' =
...
@@ -278,6 +279,8 @@ type GargAPI' =
:<|>
"tree"
:>
Summary
"Tree endpoint"
:<|>
"tree"
:>
Summary
"Tree endpoint"
:>
Capture
"id"
NodeId
:>
TreeAPI
:>
Capture
"id"
NodeId
:>
TreeAPI
:<|>
"upload"
:>
ApiUpload
-- :<|> "scraper" :> WithCallbacks ScraperAPI
-- :<|> "scraper" :> WithCallbacks ScraperAPI
...
@@ -320,6 +323,7 @@ serverGargAPI -- orchestrator
...
@@ -320,6 +323,7 @@ serverGargAPI -- orchestrator
:<|>
search
:<|>
search
:<|>
graphAPI
-- TODO: mock
:<|>
graphAPI
-- TODO: mock
:<|>
treeAPI
:<|>
treeAPI
:<|>
upload
-- :<|> orchestrator
-- :<|> orchestrator
where
where
fakeUserId
=
1
-- TODO
fakeUserId
=
1
-- TODO
...
...
src/Gargantext/API/Node.hs
View file @
78e599d1
...
@@ -186,7 +186,6 @@ nodeAPI p uId id
...
@@ -186,7 +186,6 @@ nodeAPI p uId id
:<|>
phyloAPI
id
:<|>
phyloAPI
id
-- Annuaire
-- Annuaire
-- :<|> upload
-- :<|> query
-- :<|> query
------------------------------------------------------------------------
------------------------------------------------------------------------
...
@@ -361,25 +360,7 @@ query :: Monad m => Text -> m Text
...
@@ -361,25 +360,7 @@ query :: Monad m => Text -> m Text
query
s
=
pure
s
query
s
=
pure
s
-- | Upload files
-------------------------------------------------------------
-- TODO Is it possible to adapt the function according to iValue input ?
--upload :: MultipartData -> Handler Text
--upload multipartData = do
-- liftIO $ do
-- putStrLn "Inputs:"
-- forM_ (inputs multipartData) $ \input ->
-- putStrLn $ " " <> show (iName input)
-- <> " -> " <> show (iValue input)
--
-- forM_ (files multipartData) $ \file -> do
-- content <- readFile (fdFilePath file)
-- putStrLn $ "Content of " <> show (fdFileName file)
-- <> " at " <> fdFilePath file
-- putStrLn content
-- pure (pack "Data loaded")
-------------------------------------------------------------------------------
type
MetricsAPI
=
Summary
"SepGen IncExc metrics"
type
MetricsAPI
=
Summary
"SepGen IncExc metrics"
:>
QueryParam
"list"
ListId
:>
QueryParam
"list"
ListId
:>
QueryParamR
"ngramsType"
TabType
:>
QueryParamR
"ngramsType"
TabType
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment