w3c_api 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +16 -1
- data/.rubocop_todo.yml +23 -32
- data/README.adoc +297 -827
- data/Rakefile +3 -3
- data/demo/rate_limiting_demo.rb +135 -0
- data/demo/test_embed_functionality.rb +88 -0
- data/demo/test_improved_embed_functionality.rb +92 -0
- data/examples/rate_limiting_stress_test.rb +239 -0
- data/exe/w3c_api +1 -1
- data/lib/w3c_api/cli.rb +29 -28
- data/lib/w3c_api/client.rb +30 -7
- data/lib/w3c_api/commands/affiliation.rb +15 -12
- data/lib/w3c_api/commands/ecosystem.rb +22 -15
- data/lib/w3c_api/commands/group.rb +32 -25
- data/lib/w3c_api/commands/output_formatter.rb +1 -1
- data/lib/w3c_api/commands/participation.rb +11 -9
- data/lib/w3c_api/commands/series.rb +11 -9
- data/lib/w3c_api/commands/specification.rb +59 -45
- data/lib/w3c_api/commands/specification_version.rb +21 -12
- data/lib/w3c_api/commands/translation.rb +7 -6
- data/lib/w3c_api/commands/user.rb +36 -24
- data/lib/w3c_api/embed.rb +40 -0
- data/lib/w3c_api/hal.rb +374 -164
- data/lib/w3c_api/models/account.rb +3 -3
- data/lib/w3c_api/models/affiliation.rb +8 -7
- data/lib/w3c_api/models/affiliation_index.rb +3 -2
- data/lib/w3c_api/models/call_for_translation.rb +4 -3
- data/lib/w3c_api/models/chair_index.rb +2 -2
- data/lib/w3c_api/models/charter.rb +5 -5
- data/lib/w3c_api/models/charter_index.rb +3 -2
- data/lib/w3c_api/models/connected_account.rb +2 -2
- data/lib/w3c_api/models/deliverer_index.rb +3 -2
- data/lib/w3c_api/models/ecosystem.rb +8 -6
- data/lib/w3c_api/models/ecosystem_index.rb +3 -2
- data/lib/w3c_api/models/editor_index.rb +2 -2
- data/lib/w3c_api/models/evangelist_index.rb +3 -2
- data/lib/w3c_api/models/group.rb +16 -13
- data/lib/w3c_api/models/group_index.rb +2 -2
- data/lib/w3c_api/models/groups.rb +2 -2
- data/lib/w3c_api/models/participant_index.rb +3 -2
- data/lib/w3c_api/models/participation.rb +6 -5
- data/lib/w3c_api/models/participation_index.rb +3 -2
- data/lib/w3c_api/models/photo.rb +1 -1
- data/lib/w3c_api/models/serie.rb +6 -4
- data/lib/w3c_api/models/serie_index.rb +3 -2
- data/lib/w3c_api/models/spec_version.rb +10 -7
- data/lib/w3c_api/models/spec_version_index.rb +3 -2
- data/lib/w3c_api/models/spec_version_predecessor_index.rb +3 -2
- data/lib/w3c_api/models/spec_version_successor_index.rb +3 -2
- data/lib/w3c_api/models/specification.rb +17 -9
- data/lib/w3c_api/models/specification_index.rb +3 -2
- data/lib/w3c_api/models/team_contact_index.rb +3 -2
- data/lib/w3c_api/models/testimonial.rb +2 -2
- data/lib/w3c_api/models/translation.rb +4 -4
- data/lib/w3c_api/models/translation_index.rb +3 -2
- data/lib/w3c_api/models/user.rb +16 -11
- data/lib/w3c_api/models/user_index.rb +2 -2
- data/lib/w3c_api/models.rb +52 -37
- data/lib/w3c_api/version.rb +1 -1
- data/lib/w3c_api.rb +8 -7
- metadata +10 -19
data/lib/w3c_api/hal.rb
CHANGED
@@ -1,142 +1,271 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
|
3
|
+
require "singleton"
|
4
|
+
require "lutaml/hal"
|
5
|
+
require_relative "models"
|
5
6
|
|
6
7
|
module W3cApi
|
8
|
+
# Simple parameter class to satisfy lutaml-hal validation requirements
|
9
|
+
class SimpleParameter
|
10
|
+
attr_reader :name, :location, :required, :default_value
|
11
|
+
|
12
|
+
def initialize(name, location: :path, required: false, default_value: nil)
|
13
|
+
@name = name.to_s
|
14
|
+
@location = location
|
15
|
+
@required = required
|
16
|
+
@default_value = default_value
|
17
|
+
end
|
18
|
+
|
19
|
+
def validate!
|
20
|
+
# Simple validation - just ensure name is present
|
21
|
+
if @name.nil? || @name.empty?
|
22
|
+
raise ArgumentError,
|
23
|
+
"Parameter name cannot be empty"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def path_parameter?
|
28
|
+
@location == :path
|
29
|
+
end
|
30
|
+
|
31
|
+
def query_parameter?
|
32
|
+
@location == :query
|
33
|
+
end
|
34
|
+
|
35
|
+
def validate_value(value)
|
36
|
+
# Simple validation - accept any non-nil value
|
37
|
+
!value.nil?
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
7
41
|
class Hal
|
8
42
|
include Singleton
|
9
43
|
|
10
|
-
API_URL =
|
44
|
+
API_URL = "https://api.w3.org/"
|
11
45
|
|
12
46
|
def initialize
|
13
|
-
setup
|
47
|
+
# Don't call setup here - it will be called when register is first accessed
|
14
48
|
end
|
15
49
|
|
16
50
|
def client
|
17
|
-
@client ||= Lutaml::Hal::Client.new(
|
51
|
+
@client ||= Lutaml::Hal::Client.new(
|
52
|
+
api_url: API_URL,
|
53
|
+
rate_limiting: rate_limiting_options,
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Configure rate limiting options
|
58
|
+
def rate_limiting_options
|
59
|
+
@rate_limiting_options ||= {
|
60
|
+
enabled: true,
|
61
|
+
max_retries: 3,
|
62
|
+
base_delay: 1.0,
|
63
|
+
max_delay: 60.0,
|
64
|
+
backoff_factor: 2.0,
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Set rate limiting options
|
69
|
+
def configure_rate_limiting(options = {})
|
70
|
+
@rate_limiting_options = rate_limiting_options.merge(options)
|
71
|
+
# Reset client to pick up new options
|
72
|
+
@client = nil
|
73
|
+
end
|
74
|
+
|
75
|
+
# Disable rate limiting
|
76
|
+
def disable_rate_limiting
|
77
|
+
configure_rate_limiting(enabled: false)
|
78
|
+
end
|
79
|
+
|
80
|
+
# Enable rate limiting
|
81
|
+
def enable_rate_limiting
|
82
|
+
configure_rate_limiting(enabled: true)
|
18
83
|
end
|
19
84
|
|
20
85
|
def register
|
21
86
|
return @register if @register
|
22
87
|
|
23
88
|
@register = Lutaml::Hal::ModelRegister.new(name: :w3c_api, client: client)
|
24
|
-
Lutaml::Hal::GlobalRegister.instance.register(
|
25
|
-
|
26
|
-
|
89
|
+
Lutaml::Hal::GlobalRegister.instance.register(:w3c_api, @register)
|
90
|
+
|
91
|
+
# Re-run setup to register all endpoints with the new register
|
92
|
+
setup
|
93
|
+
|
27
94
|
@register
|
28
95
|
end
|
29
96
|
|
97
|
+
def reset_register
|
98
|
+
@register = nil
|
99
|
+
end
|
100
|
+
|
30
101
|
private
|
31
102
|
|
32
|
-
# Common pagination
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
103
|
+
# Common pagination parameters (simplified without EndpointParameter)
|
104
|
+
def pagination_parameters
|
105
|
+
[
|
106
|
+
SimpleParameter.new("page", location: :query),
|
107
|
+
SimpleParameter.new("items", location: :query),
|
108
|
+
]
|
109
|
+
end
|
110
|
+
|
111
|
+
# Parameters for endpoints with embed support (simplified without EndpointParameter)
|
112
|
+
def embed_parameters
|
113
|
+
[
|
114
|
+
SimpleParameter.new("embed", location: :query),
|
115
|
+
] + pagination_parameters
|
116
|
+
end
|
117
|
+
|
118
|
+
# Helper methods for common parameter types (using SimpleParameter)
|
119
|
+
def string_path_param(name, _description = nil)
|
120
|
+
SimpleParameter.new(name, location: :path)
|
121
|
+
end
|
122
|
+
|
123
|
+
def integer_path_param(name, _description = nil)
|
124
|
+
SimpleParameter.new(name, location: :path)
|
125
|
+
end
|
126
|
+
|
127
|
+
def string_query_param(name, _description = nil, required: false)
|
128
|
+
SimpleParameter.new(name, location: :query, required: required)
|
129
|
+
end
|
37
130
|
|
38
131
|
# Helper method to add index endpoints with pagination
|
39
|
-
def add_index_endpoint(id, url, model,
|
132
|
+
def add_index_endpoint(id, url, model, parameters = pagination_parameters)
|
40
133
|
register.add_endpoint(
|
41
134
|
id: id,
|
42
135
|
type: :index,
|
43
136
|
url: url,
|
44
137
|
model: model,
|
45
|
-
|
138
|
+
parameters: parameters,
|
46
139
|
)
|
47
140
|
end
|
48
141
|
|
49
142
|
# Helper method to add resource endpoints
|
50
|
-
def add_resource_endpoint(id, url, model)
|
143
|
+
def add_resource_endpoint(id, url, model, parameters = [])
|
51
144
|
register.add_endpoint(
|
52
145
|
id: id,
|
53
146
|
type: :resource,
|
54
147
|
url: url,
|
55
|
-
model: model
|
148
|
+
model: model,
|
149
|
+
parameters: parameters,
|
56
150
|
)
|
57
151
|
end
|
58
152
|
|
59
|
-
# Helper method to add
|
60
|
-
def
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
# Helper method to add individual nested endpoints
|
71
|
-
def add_nested_endpoint(parent_resource, parent_id_param, endpoint_name, endpoint_path, model)
|
72
|
-
add_index_endpoint(
|
73
|
-
:"#{parent_resource}_#{endpoint_name}_index",
|
74
|
-
"/#{parent_resource}/#{parent_id_param}/#{endpoint_path}",
|
75
|
-
model
|
153
|
+
# Helper method to add endpoints with path parameters
|
154
|
+
def add_endpoint_with_path_params(id, type, url, model, path_params = [],
|
155
|
+
query_params = [])
|
156
|
+
parameters = (path_params + query_params).compact
|
157
|
+
register.add_endpoint(
|
158
|
+
id: id,
|
159
|
+
type: type,
|
160
|
+
url: url,
|
161
|
+
model: model,
|
162
|
+
parameters: parameters,
|
76
163
|
)
|
77
164
|
end
|
78
165
|
|
79
166
|
def setup
|
80
|
-
# Specification endpoints
|
167
|
+
# Specification endpoints with embed support
|
81
168
|
add_index_endpoint(
|
82
169
|
:specification_index,
|
83
|
-
|
84
|
-
Models::SpecificationIndex
|
85
|
-
|
86
|
-
add_resource_endpoint(
|
87
|
-
:specification_resource,
|
88
|
-
'/specifications/{shortname}',
|
89
|
-
Models::Specification
|
170
|
+
"/specifications",
|
171
|
+
Models::SpecificationIndex,
|
172
|
+
embed_parameters,
|
90
173
|
)
|
91
|
-
|
174
|
+
|
175
|
+
# Specification by status endpoint
|
176
|
+
add_endpoint_with_path_params(
|
92
177
|
:specification_by_status_index,
|
93
|
-
|
178
|
+
:index,
|
179
|
+
"/specifications",
|
94
180
|
Models::SpecificationIndex,
|
95
|
-
|
181
|
+
[],
|
182
|
+
[string_query_param("status", required: true)] + pagination_parameters,
|
183
|
+
)
|
184
|
+
add_endpoint_with_path_params(
|
185
|
+
:specification_resource,
|
186
|
+
:resource,
|
187
|
+
"/specifications/{shortname}",
|
188
|
+
Models::Specification,
|
189
|
+
[string_path_param("shortname")],
|
96
190
|
)
|
97
191
|
|
98
192
|
# Specification version endpoints
|
99
|
-
|
193
|
+
add_endpoint_with_path_params(
|
100
194
|
:specification_resource_version_index,
|
101
|
-
|
102
|
-
|
195
|
+
:index,
|
196
|
+
"/specifications/{shortname}/versions",
|
197
|
+
Models::SpecVersionIndex,
|
198
|
+
[string_path_param("shortname")],
|
199
|
+
pagination_parameters,
|
103
200
|
)
|
104
|
-
|
201
|
+
add_endpoint_with_path_params(
|
105
202
|
:specification_resource_version_resource,
|
106
|
-
|
107
|
-
|
203
|
+
:resource,
|
204
|
+
"/specifications/{shortname}/versions/{version}",
|
205
|
+
Models::SpecVersion,
|
206
|
+
[
|
207
|
+
string_path_param("shortname"),
|
208
|
+
string_path_param("version"),
|
209
|
+
],
|
108
210
|
)
|
109
211
|
|
110
212
|
# Specification version editors and deliverers
|
111
|
-
|
213
|
+
add_endpoint_with_path_params(
|
112
214
|
:specification_version_editors_index,
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
215
|
+
:index,
|
216
|
+
"/specifications/{shortname}/versions/{version}/editors",
|
217
|
+
Models::EditorIndex,
|
218
|
+
[
|
219
|
+
string_path_param("shortname"),
|
220
|
+
string_path_param("version"),
|
221
|
+
],
|
222
|
+
pagination_parameters,
|
223
|
+
)
|
224
|
+
add_endpoint_with_path_params(
|
117
225
|
:specification_version_deliverers_index,
|
118
|
-
|
119
|
-
|
226
|
+
:index,
|
227
|
+
"/specifications/{shortname}/versions/{version}/deliverers",
|
228
|
+
Models::DelivererIndex,
|
229
|
+
[
|
230
|
+
string_path_param("shortname"),
|
231
|
+
string_path_param("version"),
|
232
|
+
],
|
233
|
+
pagination_parameters,
|
120
234
|
)
|
121
235
|
|
122
236
|
# Specification version predecessors and successors
|
123
|
-
|
237
|
+
add_endpoint_with_path_params(
|
124
238
|
:specification_version_predecessors_index,
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
239
|
+
:index,
|
240
|
+
"/specifications/{shortname}/versions/{version}/predecessors",
|
241
|
+
Models::SpecVersionPredecessorIndex,
|
242
|
+
[
|
243
|
+
string_path_param("shortname"),
|
244
|
+
string_path_param("version"),
|
245
|
+
],
|
246
|
+
pagination_parameters,
|
247
|
+
)
|
248
|
+
add_endpoint_with_path_params(
|
129
249
|
:specification_version_successors_index,
|
130
|
-
|
131
|
-
|
250
|
+
:index,
|
251
|
+
"/specifications/{shortname}/versions/{version}/successors",
|
252
|
+
Models::SpecVersionSuccessorIndex,
|
253
|
+
[
|
254
|
+
string_path_param("shortname"),
|
255
|
+
string_path_param("version"),
|
256
|
+
],
|
257
|
+
pagination_parameters,
|
132
258
|
)
|
133
259
|
|
134
260
|
# Specification related endpoints
|
135
261
|
%w[supersedes superseded_by editors deliverers].each do |relation|
|
136
|
-
|
262
|
+
add_endpoint_with_path_params(
|
137
263
|
:"specification_#{relation}_index",
|
264
|
+
:index,
|
138
265
|
"/specifications/{shortname}/#{relation.tr('_', '-')}",
|
139
|
-
relation.include?(
|
266
|
+
relation.include?("editor") ? Models::UserIndex : Models::GroupIndex,
|
267
|
+
[string_path_param("shortname")],
|
268
|
+
pagination_parameters,
|
140
269
|
)
|
141
270
|
end
|
142
271
|
|
@@ -148,86 +277,123 @@ module W3cApi
|
|
148
277
|
# model: Models::SpecificationIndex
|
149
278
|
# )
|
150
279
|
|
151
|
-
# Series endpoints
|
280
|
+
# Series endpoints with embed support
|
152
281
|
add_index_endpoint(
|
153
282
|
:serie_index,
|
154
|
-
|
155
|
-
Models::SerieIndex
|
283
|
+
"/specification-series",
|
284
|
+
Models::SerieIndex,
|
285
|
+
embed_parameters,
|
156
286
|
)
|
157
|
-
|
287
|
+
add_endpoint_with_path_params(
|
158
288
|
:serie_resource,
|
159
|
-
|
160
|
-
|
289
|
+
:resource,
|
290
|
+
"/specification-series/{shortname}",
|
291
|
+
Models::Serie,
|
292
|
+
[string_path_param("shortname")],
|
161
293
|
)
|
162
|
-
|
294
|
+
add_endpoint_with_path_params(
|
163
295
|
:serie_specification_resource,
|
164
|
-
|
165
|
-
|
296
|
+
:index,
|
297
|
+
"/specification-series/{shortname}/specifications",
|
298
|
+
Models::SpecificationIndex,
|
299
|
+
[string_path_param("shortname")],
|
300
|
+
pagination_parameters,
|
166
301
|
)
|
167
302
|
|
168
|
-
# Group endpoints
|
303
|
+
# Group endpoints with embed support
|
169
304
|
add_index_endpoint(
|
170
305
|
:group_index,
|
171
|
-
|
172
|
-
Models::GroupIndex
|
306
|
+
"/groups",
|
307
|
+
Models::GroupIndex,
|
308
|
+
embed_parameters,
|
173
309
|
)
|
174
|
-
|
310
|
+
add_endpoint_with_path_params(
|
175
311
|
:group_resource,
|
176
|
-
|
177
|
-
|
312
|
+
:resource,
|
313
|
+
"/groups/{id}",
|
314
|
+
Models::Group,
|
315
|
+
[integer_path_param("id")],
|
178
316
|
)
|
179
|
-
|
317
|
+
add_endpoint_with_path_params(
|
180
318
|
:group_by_type_shortname_resource,
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
319
|
+
:resource,
|
320
|
+
"/groups/{type}/{shortname}",
|
321
|
+
Models::Group,
|
322
|
+
[
|
323
|
+
string_path_param("type"),
|
324
|
+
string_path_param("shortname"),
|
325
|
+
],
|
326
|
+
)
|
327
|
+
add_endpoint_with_path_params(
|
185
328
|
:group_by_type_index,
|
186
|
-
|
187
|
-
|
329
|
+
:index,
|
330
|
+
"/groups/{type}",
|
331
|
+
Models::GroupIndex,
|
332
|
+
[string_path_param("type")],
|
333
|
+
pagination_parameters,
|
188
334
|
)
|
189
335
|
# Group nested endpoints
|
190
|
-
|
336
|
+
add_endpoint_with_path_params(
|
191
337
|
:group_specifications_index,
|
192
|
-
|
193
|
-
|
338
|
+
:index,
|
339
|
+
"/groups/{id}/specifications",
|
340
|
+
Models::SpecificationIndex,
|
341
|
+
[integer_path_param("id")],
|
342
|
+
pagination_parameters,
|
194
343
|
)
|
195
|
-
|
344
|
+
add_endpoint_with_path_params(
|
196
345
|
:group_users_index,
|
197
|
-
|
198
|
-
|
346
|
+
:index,
|
347
|
+
"/groups/{id}/users",
|
348
|
+
Models::UserIndex,
|
349
|
+
[integer_path_param("id")],
|
350
|
+
pagination_parameters,
|
199
351
|
)
|
200
|
-
|
352
|
+
add_endpoint_with_path_params(
|
201
353
|
:group_charters_index,
|
202
|
-
|
203
|
-
|
354
|
+
:index,
|
355
|
+
"/groups/{id}/charters",
|
356
|
+
Models::CharterIndex,
|
357
|
+
[integer_path_param("id")],
|
358
|
+
pagination_parameters,
|
204
359
|
)
|
205
|
-
|
360
|
+
add_endpoint_with_path_params(
|
206
361
|
:group_chairs_index,
|
207
|
-
|
208
|
-
|
362
|
+
:index,
|
363
|
+
"/groups/{id}/chairs",
|
364
|
+
Models::ChairIndex,
|
365
|
+
[integer_path_param("id")],
|
366
|
+
pagination_parameters,
|
209
367
|
)
|
210
|
-
|
368
|
+
add_endpoint_with_path_params(
|
211
369
|
:group_team_contacts_index,
|
212
|
-
|
213
|
-
|
370
|
+
:index,
|
371
|
+
"/groups/{id}/teamcontacts",
|
372
|
+
Models::TeamContactIndex,
|
373
|
+
[integer_path_param("id")],
|
374
|
+
pagination_parameters,
|
214
375
|
)
|
215
|
-
|
376
|
+
add_endpoint_with_path_params(
|
216
377
|
:group_participations_index,
|
217
|
-
|
218
|
-
|
378
|
+
:index,
|
379
|
+
"/groups/{id}/participations",
|
380
|
+
Models::ParticipationIndex,
|
381
|
+
[integer_path_param("id")],
|
382
|
+
pagination_parameters,
|
219
383
|
)
|
220
384
|
|
221
385
|
# Translation endpoints
|
222
386
|
add_index_endpoint(
|
223
387
|
:translation_index,
|
224
|
-
|
225
|
-
Models::TranslationIndex
|
388
|
+
"/translations",
|
389
|
+
Models::TranslationIndex,
|
226
390
|
)
|
227
|
-
|
391
|
+
add_endpoint_with_path_params(
|
228
392
|
:translation_resource,
|
229
|
-
|
230
|
-
|
393
|
+
:resource,
|
394
|
+
"/translations/{id}",
|
395
|
+
Models::Translation,
|
396
|
+
[integer_path_param("id")],
|
231
397
|
)
|
232
398
|
|
233
399
|
# User endpoints
|
@@ -238,107 +404,151 @@ module W3cApi
|
|
238
404
|
# url: '/users',
|
239
405
|
# model: Models::UserIndex
|
240
406
|
# )
|
241
|
-
|
407
|
+
add_endpoint_with_path_params(
|
242
408
|
:user_resource,
|
243
|
-
|
244
|
-
|
409
|
+
:resource,
|
410
|
+
"/users/{hash}",
|
411
|
+
Models::User,
|
412
|
+
[string_path_param("hash")],
|
245
413
|
)
|
246
414
|
|
247
415
|
# User nested endpoints
|
248
|
-
|
416
|
+
add_endpoint_with_path_params(
|
249
417
|
:user_groups_index,
|
250
|
-
|
251
|
-
|
418
|
+
:index,
|
419
|
+
"/users/{hash}/groups",
|
420
|
+
Models::GroupIndex,
|
421
|
+
[string_path_param("hash")],
|
422
|
+
pagination_parameters,
|
252
423
|
)
|
253
|
-
|
424
|
+
add_endpoint_with_path_params(
|
254
425
|
:user_affiliations_index,
|
255
|
-
|
256
|
-
|
426
|
+
:index,
|
427
|
+
"/users/{hash}/affiliations",
|
428
|
+
Models::AffiliationIndex,
|
429
|
+
[string_path_param("hash")],
|
430
|
+
pagination_parameters,
|
257
431
|
)
|
258
|
-
|
432
|
+
add_endpoint_with_path_params(
|
259
433
|
:user_participations_index,
|
260
|
-
|
261
|
-
|
434
|
+
:index,
|
435
|
+
"/users/{hash}/participations",
|
436
|
+
Models::ParticipationIndex,
|
437
|
+
[string_path_param("hash")],
|
438
|
+
pagination_parameters,
|
262
439
|
)
|
263
|
-
|
440
|
+
add_endpoint_with_path_params(
|
264
441
|
:user_chair_of_groups_index,
|
265
|
-
|
266
|
-
|
442
|
+
:index,
|
443
|
+
"/users/{hash}/chair-of-groups",
|
444
|
+
Models::GroupIndex,
|
445
|
+
[string_path_param("hash")],
|
446
|
+
pagination_parameters,
|
267
447
|
)
|
268
|
-
|
448
|
+
add_endpoint_with_path_params(
|
269
449
|
:user_team_contact_of_groups_index,
|
270
|
-
|
271
|
-
|
450
|
+
:index,
|
451
|
+
"/users/{hash}/team-contact-of-groups",
|
452
|
+
Models::GroupIndex,
|
453
|
+
[string_path_param("hash")],
|
454
|
+
pagination_parameters,
|
272
455
|
)
|
273
|
-
|
456
|
+
add_endpoint_with_path_params(
|
274
457
|
:user_specifications_index,
|
275
|
-
|
276
|
-
|
458
|
+
:index,
|
459
|
+
"/users/{hash}/specifications",
|
460
|
+
Models::SpecificationIndex,
|
461
|
+
[string_path_param("hash")],
|
462
|
+
pagination_parameters,
|
277
463
|
)
|
278
464
|
|
279
465
|
# Affiliation endpoints
|
280
466
|
add_index_endpoint(
|
281
467
|
:affiliation_index,
|
282
|
-
|
283
|
-
Models::AffiliationIndex
|
468
|
+
"/affiliations",
|
469
|
+
Models::AffiliationIndex,
|
284
470
|
)
|
285
|
-
|
471
|
+
add_endpoint_with_path_params(
|
286
472
|
:affiliation_resource,
|
287
|
-
|
288
|
-
|
473
|
+
:resource,
|
474
|
+
"/affiliations/{id}",
|
475
|
+
Models::Affiliation,
|
476
|
+
[integer_path_param("id")],
|
289
477
|
)
|
290
478
|
|
291
479
|
# Affiliation nested endpoints
|
292
|
-
|
480
|
+
add_endpoint_with_path_params(
|
293
481
|
:affiliation_participants_index,
|
294
|
-
|
295
|
-
|
482
|
+
:index,
|
483
|
+
"/affiliations/{id}/participants",
|
484
|
+
Models::ParticipantIndex,
|
485
|
+
[integer_path_param("id")],
|
486
|
+
pagination_parameters,
|
296
487
|
)
|
297
|
-
|
488
|
+
add_endpoint_with_path_params(
|
298
489
|
:affiliation_participations_index,
|
299
|
-
|
300
|
-
|
490
|
+
:index,
|
491
|
+
"/affiliations/{id}/participations",
|
492
|
+
Models::ParticipationIndex,
|
493
|
+
[integer_path_param("id")],
|
494
|
+
pagination_parameters,
|
301
495
|
)
|
302
496
|
|
303
497
|
# Ecosystem endpoints
|
304
498
|
add_index_endpoint(
|
305
499
|
:ecosystem_index,
|
306
|
-
|
307
|
-
Models::EcosystemIndex
|
500
|
+
"/ecosystems",
|
501
|
+
Models::EcosystemIndex,
|
308
502
|
)
|
309
|
-
|
503
|
+
add_endpoint_with_path_params(
|
310
504
|
:ecosystem_resource,
|
311
|
-
|
312
|
-
|
505
|
+
:resource,
|
506
|
+
"/ecosystems/{shortname}",
|
507
|
+
Models::Ecosystem,
|
508
|
+
[string_path_param("shortname")],
|
313
509
|
)
|
314
510
|
|
315
511
|
# Ecosystem nested endpoints
|
316
|
-
|
512
|
+
add_endpoint_with_path_params(
|
317
513
|
:ecosystem_groups_index,
|
318
|
-
|
319
|
-
|
514
|
+
:index,
|
515
|
+
"/ecosystems/{shortname}/groups",
|
516
|
+
Models::GroupIndex,
|
517
|
+
[string_path_param("shortname")],
|
518
|
+
pagination_parameters,
|
320
519
|
)
|
321
|
-
|
520
|
+
add_endpoint_with_path_params(
|
322
521
|
:ecosystem_evangelists_index,
|
323
|
-
|
324
|
-
|
522
|
+
:index,
|
523
|
+
"/ecosystems/{shortname}/evangelists",
|
524
|
+
Models::EvangelistIndex,
|
525
|
+
[string_path_param("shortname")],
|
526
|
+
pagination_parameters,
|
325
527
|
)
|
326
|
-
|
528
|
+
add_endpoint_with_path_params(
|
327
529
|
:ecosystem_member_organizations_index,
|
328
|
-
|
329
|
-
|
530
|
+
:index,
|
531
|
+
"/ecosystems/{shortname}/member-organizations",
|
532
|
+
Models::AffiliationIndex,
|
533
|
+
[string_path_param("shortname")],
|
534
|
+
pagination_parameters,
|
330
535
|
)
|
331
536
|
|
332
537
|
# Participation endpoints
|
333
|
-
|
538
|
+
add_endpoint_with_path_params(
|
334
539
|
:participation_resource,
|
335
|
-
|
336
|
-
|
540
|
+
:resource,
|
541
|
+
"/participations/{id}",
|
542
|
+
Models::Participation,
|
543
|
+
[integer_path_param("id")],
|
337
544
|
)
|
338
|
-
|
545
|
+
add_endpoint_with_path_params(
|
339
546
|
:participation_participants_index,
|
340
|
-
|
341
|
-
|
547
|
+
:index,
|
548
|
+
"/participations/{id}/participants",
|
549
|
+
Models::ParticipantIndex,
|
550
|
+
[integer_path_param("id")],
|
551
|
+
pagination_parameters,
|
342
552
|
)
|
343
553
|
end
|
344
554
|
end
|