[879b32]: / qiita_pet / handlers / rest / __init__.py

Download this file

41 lines (35 with data), 1.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------------------
from .study import StudyHandler, StudyCreatorHandler, StudyStatusHandler
from .study_samples import (StudySamplesHandler, StudySamplesInfoHandler,
StudySamplesCategoriesHandler,
StudySamplesDetailHandler,
StudySampleDetailHandler)
from .study_person import StudyPersonHandler
from .study_preparation import (StudyPrepCreatorHandler,
StudyPrepArtifactCreatorHandler)
__all__ = ['StudyHandler', 'StudySamplesHandler', 'StudySamplesInfoHandler',
'StudySamplesCategoriesHandler', 'StudyPersonHandler',
'StudyCreatorHandler', 'StudyPrepCreatorHandler',
'StudyPrepArtifactCreatorHandler', 'StudyStatusHandler']
ENDPOINTS = (
(r"/api/v1/study$", StudyCreatorHandler),
(r"/api/v1/study/([0-9]+)$", StudyHandler),
(r"/api/v1/study/([0-9]+)/samples/categories=([a-zA-Z\-0-9\.:,_]*)",
StudySamplesCategoriesHandler),
(r"/api/v1/study/([0-9]+)/samples", StudySamplesHandler),
(r"/api/v1/study/([0-9]+)/samples/status", StudySamplesDetailHandler),
(r"/api/v1/study/([0-9]+)/sample/([a-zA-Z\-0-9\.]+)/status",
StudySampleDetailHandler),
(r"/api/v1/study/([0-9]+)/samples/info", StudySamplesInfoHandler),
(r"/api/v1/person(.*)", StudyPersonHandler),
(r"/api/v1/study/([0-9]+)/preparation/([0-9]+)/artifact",
StudyPrepArtifactCreatorHandler),
(r"/api/v1/study/([0-9]+)/preparation(.*)", StudyPrepCreatorHandler),
(r"/api/v1/study/([0-9]+)/status$", StudyStatusHandler)
)