-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.rb
87 lines (71 loc) · 2.38 KB
/
routes.rb
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
module TaxonomyParser
module Routes
def self.registered(app)
app.get '/discoverable-taxonomy-sets' do
content_type :api_json
ApplicationController.discoverable_taxonomy_sets
end
app.get '/discoverable-taxonomy-sets/:id' do
content_type :api_json
ApplicationController.discoverable_taxonomy_set(params['id'])
end
app.get '/role-types' do
content_type :api_json
ApplicationController.role_types(params)
end
app.get '/role-types/:id' do
content_type :api_json
ApplicationController.role_type(params['id'])
end
app.get '/role-types/:id/presentation-nodes' do
content_type :api_json
ApplicationController.role_type_presentation_nodes(params['id'])
end
app.get '/elements/:id' do
content_type :api_json
ApplicationController.element(params['id'])
end
app.get '/elements/:id/presentation-nodes' do
content_type :api_json
ApplicationController.element_presentation_nodes(params['id'])
end
app.get '/elements/:id/dimension-nodes' do
content_type :api_json
ApplicationController.element_dimension_nodes(params['id'])
end
app.get '/presentation-nodes' do
content_type :api_json
ApplicationController.presentation_nodes(params)
end
app.get '/presentation-nodes/:id' do
content_type :api_json
ApplicationController.presentation_node(params['id'])
end
app.get '/presentation-nodes/:id/role-type' do
content_type :api_json
ApplicationController.presentation_node_role_type(params['id'])
end
app.get '/dimension-nodes/:id' do
content_type :api_json
ApplicationController.dimension_node(params['id'])
end
app.get '/dimension-nodes' do
content_type :api_json
ApplicationController.dimension_nodes(params)
end
app.get '/dimension-nodes/:id/element' do
content_type :api_json
ApplicationController.dimension_node_element(params['id'])
end
app.get '/labels/:id' do
content_type :api_json
ApplicationController.label(params['id'])
end
app.get '/references/:id' do
content_type :api_json
ApplicationController.reference(params['id'])
end
end
end
Sinatra.register Routes
end