-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathliturgical-calendar-DO-NOT-USE.yaml
573 lines (573 loc) · 15.6 KB
/
liturgical-calendar-DO-NOT-USE.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
swagger: '2.0'
info:
title: Liturgical Calendar API
description: |
Roman Catholic liturgical calendar.
### Parameters:
- The `lang` parameter specifies language used for titles of temporale feasts, Sundays and ferials, as well as other localized strings (mentioned as such in this documentation). Please note that while titles of sanctorale feasts are taken from the calendar, titles of abovementioned temporale celebrations are determined by the locale. So you have to choose a correct combination of locale and calendar in order to retrieve coherent data in one language. Possible values are: 'cs', 'en', 'fr', 'it', 'la'
- The `calendar` parameter is the identifier of the calendar to query. Possible values are: 'general-en', 'general-la', 'general-fr', 'general-it', 'czech', 'czech-cechy', 'czech-morava', 'czech-pha', 'czech-ltm', 'czech-hk', 'czech-cb', 'czech-plz', 'czech-olm', 'czech-brn', 'czech-oo', 'default'
- The `Date` parameter is a local date and time at which the message was originated, in RFC 1123 date format. If provided, the API server respects it and returns data relative to the client's today, specified in the header, instead of relative to it's own local today (which is default behaviour).
- The `year` parameter must be greater than or equal to the promulgation year of the calendar system. Minimum is 1970.
contact:
email: [email protected]
version: v0
externalDocs:
description: Human-readable API documentation
url: http://37.157.198.11:9000/api-doc
consumes: [application/json]
produces: [application/json]
host: http://calapi.inadiutorium.cz
basePath: /api/v0
schemes:
- http
paths:
/{lang}/calendars:
get:
description: Lists available calendars
parameters:
- name: lang
in: path
required: true
type: string
enum:
- cs
- en
- fr
- it
- la
responses:
200:
description: Calendars
schema:
type: array
items:
type: string
description: |
Calendar ID which can be used as path argument in calls to other endpoints to retrieve calendar data
default:
$ref: '#/responses/UnexpectedError'
/{lang}/calendars/{calendar}:
get:
description: Calendar description
parameters:
- name: lang
in: path
required: true
type: string
enum:
- cs
- en
- fr
- it
- la
- name: calendar
in: path
required: true
type: string
enum:
- general-en
- general-la
- general-fr
- general-it
- czech
- czech-cechy
- czech-morava
- czech-pha
- czech-ltm
- czech-hk
- czech-cb
- czech-plz
- czech-olm
- czech-brn
- czech-oo
- default
description: Identifier of the calendar to query.
responses:
200:
schema:
$ref: '#/definitions/Calendar'
default:
$ref: '#/responses/UnexpectedError'
/{lang}/calendars/{calendar}/yesterday:
get:
description: Calendar entry for yesterday
parameters:
- name: lang
in: path
required: true
type: string
enum:
- cs
- en
- fr
- it
- la
- name: calendar
in: path
required: true
type: string
enum:
- general-en
- general-la
- general-fr
- general-it
- czech
- czech-cechy
- czech-morava
- czech-pha
- czech-ltm
- czech-hk
- czech-cb
- czech-plz
- czech-olm
- czech-brn
- czech-oo
- default
description: Identifier of the calendar to query.
- name: Date
in: header
required: false
type: string
format: date
responses:
200:
schema:
$ref: '#/definitions/Day'
default:
$ref: '#/responses/UnexpectedError'
/{lang}/calendars/{calendar}/today:
get:
description: Calendar entry for today
parameters:
- name: lang
in: path
required: true
type: string
enum:
- cs
- en
- fr
- it
- la
- name: calendar
in: path
required: true
type: string
enum:
- general-en
- general-la
- general-fr
- general-it
- czech
- czech-cechy
- czech-morava
- czech-pha
- czech-ltm
- czech-hk
- czech-cb
- czech-plz
- czech-olm
- czech-brn
- czech-oo
- default
description: Identifier of the calendar to query.
- name: Date
in: header
required: false
type: string
format: date
responses:
200:
schema:
$ref: '#/definitions/Day'
default:
$ref: '#/responses/UnexpectedError'
/{lang}/calendars/{calendar}/tomorrow:
get:
description: Calendar entry for tomorrow
parameters:
- name: lang
in: path
required: true
type: string
enum:
- cs
- en
- fr
- it
- la
- name: calendar
in: path
required: true
type: string
enum:
- general-en
- general-la
- general-fr
- general-it
- czech
- czech-cechy
- czech-morava
- czech-pha
- czech-ltm
- czech-hk
- czech-cb
- czech-plz
- czech-olm
- czech-brn
- czech-oo
- default
description: Identifier of the calendar to query.
- name: Date
in: header
required: false
type: string
format: date
responses:
200:
schema:
$ref: '#/definitions/Day'
default:
$ref: '#/responses/UnexpectedError'
/{lang}/calendars/{calendar}/{year}:
get:
description: General characteristics of a liturgical year
parameters:
- name: lang
in: path
required: true
type: string
enum:
- cs
- en
- fr
- it
- la
- name: calendar
in: path
required: true
type: string
enum:
- general-en
- general-la
- general-fr
- general-it
- czech
- czech-cechy
- czech-morava
- czech-pha
- czech-ltm
- czech-hk
- czech-cb
- czech-plz
- czech-olm
- czech-brn
- czech-oo
- default
description: Identifier of the calendar to query.
- name: year
in: path
required: true
type: integer
minimum: 1970
description: |
Year must be greater than or equal to the promulgation year of the calendar system.
responses:
200:
schema:
$ref: '#/definitions/Year'
default:
$ref: '#/responses/UnexpectedError'
/{lang}/calendars/{calendar}/{year}/{month}:
get:
description: Calendar entries for a whole month
parameters:
- name: lang
in: path
required: true
type: string
enum:
- cs
- en
- fr
- it
- la
- name: calendar
in: path
required: true
type: string
enum:
- general-en
- general-la
- general-fr
- general-it
- czech
- czech-cechy
- czech-morava
- czech-pha
- czech-ltm
- czech-hk
- czech-cb
- czech-plz
- czech-olm
- czech-brn
- czech-oo
- default
description: Identifier of the calendar to query.
- name: year
in: path
required: true
type: integer
minimum: 1970
description: |
Year must be greater than or equal to the promulgation year of the calendar system.
- name: month
in: path
required: true
type: integer
minimum: 1
maximum: 12
responses:
200:
schema:
type: array
items:
$ref: '#/definitions/Day'
default:
$ref: '#/responses/UnexpectedError'
/{lang}/calendars/{calendar}/{year}/{month}/{day}:
get:
description: Calendar entry for the specified day
parameters:
- name: lang
in: path
required: true
type: string
enum:
- cs
- en
- fr
- it
- la
- name: calendar
in: path
required: true
type: string
enum:
- general-en
- general-la
- general-fr
- general-it
- czech
- czech-cechy
- czech-morava
- czech-pha
- czech-ltm
- czech-hk
- czech-cb
- czech-plz
- czech-olm
- czech-brn
- czech-oo
- default
description: Identifier of the calendar to query.
- name: year
in: path
required: true
type: integer
minimum: 1970
description: |
Year must be greater than or equal to the promulgation year of the calendar system.
- name: month
in: path
required: true
type: integer
minimum: 1
maximum: 12
- name: day
in: path
required: true
type: integer
minimum: 1
maximum: 31
responses:
200:
schema:
$ref: '#/definitions/Day'
default:
$ref: '#/responses/UnexpectedError'
definitions:
Calendar:
description: Description of a calendar
properties:
system:
type: object
description: Description of the (liturgical-legal) calendar system
properties:
promulgated:
type: integer
description: Year of promulgation
desc:
type: string
description: Reference to legal texts defining the system
sanctorale:
type: object
description: Description of the chosen sanctorale calendar
properties:
title:
type: string
description: "The calendar's name"
language:
type: string
description: "The calendar's language specified by a locale code"
Celebration:
description: Liturgical celebration (Sunday, ferial, feast, ...)
properties:
title:
type: string
description: Title of the celebration, for humans
colour:
type: string
enum:
- green
- violet
- white
- red
description: Liturgical colour
rank:
type: string
description: "Short name of the celebration's liturgical rank, localized"
rank_num:
type: number
format: float
description: |
Number from 1.1 to 4. The smaller number, the greater rank. Numbers correspond with section numbering in the Table of Liturgical Days.
Day:
description: Calendar entry of a liturgical day
properties:
date:
type: string
format: date
season:
type: string
enum:
- advent
- christmas
- lent
- easter
- ordinary
description: Liturgical season
season_week:
type: integer
description: |
Week of the season. Smallest possible value is 0 (used only in Lent, other seasons start with week 1), greatest 34.
celebrations:
type: array
items:
$ref: '#/definitions/Celebration'
description: |
List of one or more celebrations occurring on the day. Multiple items occur only in two cases: 1. choice between a non-privileged ferial and one or more optional memorials 2. a privileged ferial + one or more commemorations that can be added to the ferial office
weekday:
type: string
enum:
- sunday
- monday
- tuesday
- wednesday
- thursday
- friday
- saturday
Error:
description: Error response
properties:
error:
type: string
description: Description of the encountered error
Year:
description: General characteristics of a liturgical year
properties:
lectionary:
type: string
enum:
- A
- B
- C
description: Sunday lectionary cycle
ferial_lectionary:
type: integer
enum:
- 1
- 2
description: Ferial lectionary cycle
responses:
UnexpectedError:
description: unexpected error
schema:
$ref: '#/definitions/Error'
parameters:
lang:
name: lang
in: path
required: true
type: string
enum:
- cs
- en
- fr
- it
- la
description: |
Specifies language used for titles of temporale feasts, Sundays and ferials, as well as other localized strings (mentioned as such in this documentation). Please note that while titles of sanctorale feasts are taken from the calendar, titles of abovementioned temporale celebrations are determined by the locale. So you have to choose a correct combination of locale and calendar in order to retrieve coherent data in one language.
calendar:
name: calendar
in: path
required: true
type: string
enum:
- general-en
- general-la
- general-fr
- general-it
- czech
- czech-cechy
- czech-morava
- czech-pha
- czech-ltm
- czech-hk
- czech-cb
- czech-plz
- czech-olm
- czech-brn
- czech-oo
- default
description: Identifier of the calendar to query.
year:
name: year
in: path
required: true
type: integer
minimum: 1970
description: |
Year must be greater than or equal to the promulgation year of the calendar system.
month:
name: month
in: path
required: true
type: integer
minimum: 1
maximum: 12
day:
name: day
in: path
required: true
type: integer
minimum: 1
maximum: 31
date_header:
name: Date
in: header
required: false
type: string
format: date
description: |
Local date and time at which the message was originated, in RFC 1123 date format. If provided, the API server respects it and returns data relative to the client's today, specified in the header, instead of relative to it's own local today (which is default behaviour).