]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/Viz/Phylo/API.hs
just finalized the dot export
[gargantext.git] / src / Gargantext / Viz / Phylo / API.hs
1 {-|
2 Module : Gargantext.Viz.Phylo.API
3 Description : Phylo API
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
8 Portability : POSIX
9
10 -}
11
12
13 {-# OPTIONS_GHC -fno-warn-orphans #-}
14
15 {-# LANGUAGE NoImplicitPrelude #-}
16 {-# LANGUAGE OverloadedStrings #-} -- allows to write Text literals
17 {-# LANGUAGE OverloadedLists #-} -- allows to write Map and HashMap as lists
18
19 module Gargantext.Viz.Phylo.API
20 where
21
22 import Data.Swagger
23 import Servant.Job.Utils (swaggerOptions)
24 import Gargantext.Database.Types.Node (PhyloId, ListId, CorpusId)
25 import Gargantext.Prelude
26 import Gargantext.Viz.Phylo
27 import Gargantext.Viz.Phylo.Example
28 import Test.QuickCheck (elements)
29 import Test.QuickCheck.Arbitrary (Arbitrary, arbitrary)
30
31
32 getPhylo :: PhyloId -> PhyloView
33 getPhylo _phyloId = phyloView
34 --getPhylo :: PhyloId -> Maybe PhyloQueryView -> PhyloView
35 --getPhylo _phyloId _phyloQueryView = phyloView
36
37 postPhylo :: CorpusId -> Maybe ListId -> PhyloQueryBuild -> Phylo
38 postPhylo = undefined
39
40 putPhylo :: PhyloId -> Maybe ListId -> PhyloQueryBuild -> Phylo
41 putPhylo = undefined
42
43 deletePhylo :: PhyloId -> IO ()
44 deletePhylo = undefined
45
46
47 -- | Instances
48
49 instance ToSchema Cluster
50 instance ToSchema EdgeType
51 instance ToSchema Filiation
52 instance ToSchema Filter
53 instance ToSchema FisParams
54 instance ToSchema HammingParams
55 instance ToSchema LouvainParams
56 instance ToSchema Metric
57 instance ToSchema PhyloBranch
58 instance ToSchema PhyloEdge
59 instance ToSchema PhyloNode
60 instance ToSchema PhyloParam
61 instance ToSchema PhyloQueryBuild
62 instance ToSchema PhyloView
63 instance ToSchema RCParams
64 instance ToSchema SBParams
65 instance ToSchema Software
66 instance ToSchema WLJParams
67
68 instance ToSchema Proximity
69 where
70 declareNamedSchema = genericDeclareNamedSchemaUnrestricted
71 $ swaggerOptions ""
72
73 instance Arbitrary PhyloView
74 where
75 arbitrary = elements [phyloView]
76