Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
b6883810
Commit
b6883810
authored
Sep 02, 2017
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/simon-unstable-jwt' into unstable
parents
e1972d80
e383a7a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
38 deletions
+47
-38
urls.py
gargantext/views/api/urls.py
+46
-38
requirements.txt
install/gargamelle/requirements.txt
+1
-0
No files found.
gargantext/views/api/urls.py
View file @
b6883810
from
django.conf.urls
import
url
from
rest_framework_jwt.views
import
obtain_jwt_token
from
.
import
nodes
from
.
import
projects
from
.
import
corpora
...
...
@@ -10,78 +12,81 @@ from . import ngramlists
from
.
import
analytics
from
graph.rest
import
Graph
urlpatterns
=
[
url
(
r'^nodes$'
,
nodes
.
NodeListResource
.
as_view
()
)
,
url
(
r'^nodes/(\d+)$'
,
nodes
.
NodeResource
.
as_view
()
)
,
url
(
r'^nodes/(\d+)/having$'
,
nodes
.
NodeListHaving
.
as_view
()
)
,
url
(
r'^nodes/(\d+)/status$'
,
nodes
.
Status
.
as_view
()
)
#Projects
,
url
(
r'^projects$'
,
projects
.
ProjectList
.
as_view
()
)
,
url
(
r'^projects/(\d+)$'
,
projects
.
ProjectView
.
as_view
()
)
#?view=resource
#?view=docs
#Corpora
,
url
(
r'^projects/(\d+)/corpora/(\d+)$'
,
corpora
.
CorpusView
.
as_view
()
)
#?view=source
#?view=title
#?view=analytics
#Sources
#, url(r'^projects/(\d+)/corpora/(\d+)/sources$' , corpora.CorpusSources.as_view() )
#, url(r'^projects/(\d+)/corpora/(\d+)/sources/(\d+)$' , corpora.CorpusSourceView.as_view() )
#Facets
,
url
(
r'^projects/(\d+)/corpora/(\d+)/facets$'
,
nodes
.
CorpusFacet
.
as_view
()
)
#Favorites
,
url
(
r'^projects/(\d+)/corpora/(\d+)/favorites$'
,
nodes
.
CorpusFavorites
.
as_view
()
)
#Metrics
,
url
(
r'^projects/(\d+)/corpora/(\d+)/metrics$'
,
metrics
.
CorpusMetrics
.
as_view
()
)
#GraphExplorer
,
url
(
r'^projects/(\d+)/corpora/(\d+)/explorer$'
,
Graph
.
as_view
())
urlpatterns
=
[
url
(
r'^nodes$'
,
nodes
.
NodeListResource
.
as_view
())
,
url
(
r'^nodes/(\d+)$'
,
nodes
.
NodeResource
.
as_view
())
,
url
(
r'^nodes/(\d+)/having$'
,
nodes
.
NodeListHaving
.
as_view
())
,
url
(
r'^nodes/(\d+)/status$'
,
nodes
.
Status
.
as_view
())
# Projects
,
url
(
r'^projects$'
,
projects
.
ProjectList
.
as_view
())
,
url
(
r'^projects/(\d+)$'
,
projects
.
ProjectView
.
as_view
())
# Corpora
,
url
(
r'^projects/(\d+)/corpora/(\d+)$'
,
corpora
.
CorpusView
.
as_view
())
# Sources
#, url(r'^projects/(\d+)/corpora/(\d+)/sources$', corpora.CorpusSources.as_view())
#, url(r'^projects/(\d+)/corpora/(\d+)/sources/(\d+)$ , corpora.CorpusSourceView.as_view())
# Facets
,
url
(
r'^projects/(\d+)/corpora/(\d+)/facets$'
,
nodes
.
CorpusFacet
.
as_view
())
# Favorites
,
url
(
r'^projects/(\d+)/corpora/(\d+)/favorites$'
,
nodes
.
CorpusFavorites
.
as_view
())
# Metrics
,
url
(
r'^projects/(\d+)/corpora/(\d+)/metrics$'
,
metrics
.
CorpusMetrics
.
as_view
())
# GraphExplorer
,
url
(
r'^projects/(\d+)/corpora/(\d+)/explorer$'
,
Graph
.
as_view
())
# data for graph explorer (json)
# GET /api/projects/43198/corpora/111107/explorer?
# Corresponding view is : /projects/43198/corpora/111107/explorer?
# Parameters (example):
# explorer?field1=ngrams&field2=ngrams&distance=conditional&bridgeness=5&start=1996-6-1&end=2002-10-5
# Ngrams
,
url
(
r'^ngrams/?$'
,
ngrams
.
ApiNgrams
.
as_view
()
)
,
url
(
r'^ngrams/?$'
,
ngrams
.
ApiNgrams
.
as_view
())
# Analytics
,
url
(
r'^nodes/(\d+)/histories$'
,
analytics
.
NodeNgramsQueries
.
as_view
())
,
url
(
r'hyperdata$'
,
analytics
.
ApiHyperdata
.
as_view
()
)
,
url
(
r'hyperdata$'
,
analytics
.
ApiHyperdata
.
as_view
())
# get a list of ngram_ids or ngram_infos by list_id
# url(r'^ngramlists/(\d+)$', ngramlists.List.as_view()),
,
url
(
r'^nodes/(\d+)/facets$'
,
nodes
.
CorpusFacet
.
as_view
()
)
,
url
(
r'^nodes/(\d+)/favorites$'
,
nodes
.
CorpusFavorites
.
as_view
()
)
# in these two routes the node is supposed to be a *corpus* node
,
url
(
r'^nodes/(\d+)/facets$'
,
nodes
.
CorpusFacet
.
as_view
())
,
url
(
r'^nodes/(\d+)/favorites$'
,
nodes
.
CorpusFavorites
.
as_view
())
# in these two routes the node is supposed to be a *corpus* node
,
url
(
r'^metrics/(\d+)$'
,
metrics
.
CorpusMetrics
.
as_view
()
)
,
url
(
r'^metrics/(\d+)$'
,
metrics
.
CorpusMetrics
.
as_view
()
)
# update all metrics for a corpus
# ex: PUT metrics/123
# \
# corpus id
,
url
(
r'^ngramlists/export$'
,
ngramlists
.
CSVLists
.
as_view
()
)
,
url
(
r'^ngramlists/export$'
,
ngramlists
.
CSVLists
.
as_view
())
# get a CSV export of the ngramlists of a corpus
# ex: GET ngramlists/export?corpus=43
# TODO : unify to a /api/ngrams?formatted=csv
# (similar to /api/nodes?formatted=csv)
,
url
(
r'^ngramlists/import$'
,
ngramlists
.
CSVLists
.
as_view
()
)
,
url
(
r'^ngramlists/import$'
,
ngramlists
.
CSVLists
.
as_view
())
# same handling class as export (CSVLists)
# but this route used only for POST + file
# or PATCH + other corpus id
,
url
(
r'^ngramlists/change$'
,
ngramlists
.
ListChange
.
as_view
()
)
,
url
(
r'^ngramlists/change$'
,
ngramlists
.
ListChange
.
as_view
())
# add or remove ngram from a list
# ex: add <=> PUT ngramlists/change?list=42&ngrams=1,2
# rm <=> DEL ngramlists/change?list=42&ngrams=1,2
,
url
(
r'^ngramlists/groups$'
,
ngramlists
.
GroupChange
.
as_view
()
)
,
url
(
r'^ngramlists/groups$'
,
ngramlists
.
GroupChange
.
as_view
())
# modify grouping couples of a group node
# ex: PUT/DEL ngramlists/groups?node=43
# & group data also in url: 767[]=209,640 & 779[]=436,265,385
,
url
(
r'^ngramlists/family$'
,
ngramlists
.
ListFamily
.
as_view
()
)
,
url
(
r'^ngramlists/family$'
,
ngramlists
.
ListFamily
.
as_view
()
)
# entire combination of lists from a corpus, dedicated to termtable
# (or any combination of lists that go together :
# - a mainlist
...
...
@@ -89,8 +94,11 @@ urlpatterns = [ url(r'^nodes$' , nodes.NodeListResource.as_view()
# - an optional maplist
# - an optional grouplist
,
url
(
r'^ngramlists/maplist$'
,
ngramlists
.
MapListGlance
.
as_view
()
)
,
url
(
r'^ngramlists/maplist$'
,
ngramlists
.
MapListGlance
.
as_view
()
)
# fast access to maplist, similarly formatted for termtable
,
url
(
r'^user/parameters/$'
,
users
.
UserParameters
.
as_view
())
,
url
(
r'^user/parameters/$'
,
users
.
UserParameters
.
as_view
())
,
url
(
'^auth/token$'
,
obtain_jwt_token
)
]
install/gargamelle/requirements.txt
View file @
b6883810
...
...
@@ -11,6 +11,7 @@ django-celery==3.2.1
django-pgfields==1.4.4
django-pgjsonb==0.0.23
djangorestframework==3.5.3
djangorestframework-jwt==1.9.0
html5lib==0.9999999
python-igraph>=0.7.1
jdatetime==1.7.2
...
...
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