Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio authored Aug 10, 2020
1 parent 3e47e38 commit b211e28
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,22 @@ Some characteristics of this endpoint:
# How to use the endpoint
There are two examples of usage of the endpoint at https://johnromanodorazio.com/LiturgicalCalendar/, in this case for generating an HTML representation of the Liturgical Calendar.

* The [first example](https://johnromanodorazio.com/LiturgicalCalendar/examples/javascript_liturgical_calendar.php) uses AJAX in Javascript to make the request to the endpoint and handle the results.
* The [second example](https://johnromanodorazio.com/LiturgicalCalendar/examples/curl_liturgical_calendar.php) uses cURL in PHP to make a request to the endpoint and handle the results.
* The [first example](https://www.johnromanodorazio.com/LiturgicalCalendar/examples/php/) uses cURL in PHP to make a request to the endpoint and handle the results.
* The [second example](https://www.johnromanodorazio.com/LiturgicalCalendar/examples/javascript/) uses AJAX in Javascript to make the request to the endpoint and handle the results.
* The [third example](https://www.johnromanodorazio.com/LiturgicalCalendar/examples/fullcalendar/examples/month-view.html) makes use of the FullCalendar javascript framework to display the results from the AJAX request in a nicely formatted calendar view.
* The [fourth example](https://www.johnromanodorazio.com/LiturgicalCalendar/examples/fullcalendar/examples/messages.html) is the same as the third except that it outputs the Messages first and the calendar view after.

Both of these examples request JSON as the data exchange format generated by the endpoint. But any application could use the endpoint in a similar manner: an Android App, a plugin for a Desktop Publishing App...
All of these examples request `JSON` as the data exchange format generated by the endpoint. Any application could use the endpoint in a similar manner: an Android App, a plugin for a Desktop Publishing App...

## Parameters that can be used in the request to the endpoint
* ***`locale`***: can have a value of *`EN`*, *`IT`*, or *`LA`* (*default*: ***`LA`***). Sets the desired localization for the Calendar to *English*, *Italian*, or *Latin* respectively.
* ***`year`***: can have a value starting from *`1970`* and a maximum value of *`9999`* (*default*: ***current year***). For the time being, this endpoint only calculates the Liturgical Calendar that follows the reform of the Second Vatican Council, starting from the publishing of the *Editio Typica* of the Roman Missal in 1970. Perhaps in future updates information from the calendar preceding the Second Vatican Council will be added, in order to have a greater historical range from the endpoint.
* ***`returntype`***: can have a value of *`JSON`*, *`XML`*, or *`ICS`* (*default*: ***`JSON`***). Indicates the format of the data that will be returned by the endpoint. **N.B.** the desired data type should also be detected from the `Accept header` set by the requesting client, if not indicated by means of the `returntype` parameter; in this case, possible values are `application/json`, `application/xml`, and `text/calendar`
* ***`epiphany`***: can have a value of *`SUNDAY_JAN2_JAN8`* or *`JAN6`* (*default*: ***`JAN6`***). Indicates whether Epiphany should fall exactly on January 6th or instead on the Sunday between January 2nd and January 8th. Traditionally it falls on January 6th in the Vatican, but each regional Conference of Bishops can opt to celebrate on the Sunday.
* ***`ascension`***: can have a value of *`THURSDAY`* or *`SUNDAY`* (*default*: ***`SUNDAY`***). Indicates whether the feast of the Ascension should fall on a Thursday or on a Sunday. Traditionally in the Vatican it falls on a Thursday, but for pastoral reasons each regional Conference of Bishops can opt to celebrate on Sunday.
* ***`corpuschristi`***: can have a value of *`THURSDAY`* or *`SUNDAY`* (*default*: ***`SUNDAY`***). Indicates whether the feast of Corpus Christi should fall on a Thursday or on a Sunday. Traditionally in the Vatican it falls on a Thursday, but for pastoral reasons each regional Conference of Bishops can opt to celebrate on Sunday.
* ***`nationalpreset`***: supported values as of v2.8 are *`VATICAN`*, *`ITALY`*, and *`USA`*. This will take precedence over the previous parameters. For example, a value of `ITALY` will automatically set `locale` to `IT`, `epiphany` to `JAN6`, `ascension` to `SUNDAY` and `corpuschristi` to `SUNDAY`, and it will add to / modify the calendar with those celebrations that are proper to the Italian Missal. Similarly a value of `USA` will automatically set `locale` to `EN`, `epiphany` to `SUNDAY_JAN2_JAN8`, `ascension` to `SUNDAY` and `corpuschristi` to `SUNDAY`, and will add to / modify the calendar with the celebrations that are proper to the English USA Missal. A value of `VATICAN` will set `locale` to `LA`, `epiphany` to `JAN6`, `ascension` to `THURSDAY` and `corpuschristi` to `THURSDAY` (even though these last two might change from to year within the Vatican).
* ***`diocesanpreset`***: only supported value as of v2.8 is *`DIOCESIDIROMA`*, (a value of `DIOCESILAZIO` is equivalent to `DIOCESIDIROMA` as of v2.8). This will take precedence over the previous parameters. For example, a value of `DIOCESIDIROMA` will automatically set `nationalpreset` to `ITALY`, and will add to / modify the calendar with those celebrations that are proper to the Diocese of Rome, based on the calendar for Italy.
* ***`year`***: can have a value starting from *`1970`* and a maximum value of *`9999`* (*default*: ***current year***). For the time being, this endpoint only calculates the Liturgical Calendar that follows the reform of the Second Vatican Council, starting from the publishing of the *Editio Typica* of the Roman Missal in 1970. Perhaps in future updates information from the calendar preceding the Second Vatican Council will be added, in order to have a greater historical range from the endpoint.
* ***`returntype`***: can have a value of *`JSON`*, *`XML`*, or *`ICS`* (*default*: ***`JSON`***). Indicates the format of the data that will be returned by the endpoint. **N.B.** the desired data type should also be detected from the `Accept header` set by the requesting client, if not indicated by means of the `returntype` parameter; in this case, possible values are `application/json`, `application/xml`, and `text/calendar`

**N.B.** The parameter names are expected to be in lowercase characters. The parameter values are generally expected to be in uppercase characters, but they will work in lowercase characters just as well (starting from v2.5).

Expand Down Expand Up @@ -131,6 +135,12 @@ Each of the events generated is represented as an object whose key => value pair

# CHANGELOG

## [v2.8](https://github.com/JohnRDOrazio/LiturgicalCalendar/releases/tag/v2.8) (August 11th 2020)
* adds `diocesanpreset` and `nationalpreset` parameters with relative calendar data
* adds all of the data from the recent Decrees of the Congregation for Divine Worship and verifies integrity with past Decrees
* ensures `Messages` returned are as specific as possible, while trying to keep the code as clean as possible
* adds FullCalendar example

## [v2.7](https://github.com/JohnRDOrazio/LiturgicalCalendar/releases/tag/v2.7) (July 28th 2020)
* adds `Messages` array to the data that is generated by the endpoint, justifying the calculations made for the generation of the requested calendar
* fixes an issue with the memorial Saint Jane Frances de Chantal after 1999, when it was decided to move the memorial from Dec. 12 to Aug. 12 in order to allow Our Lady of Guadalupe on Dec. 12 (if another more important celebration took place on Dec. 12, Saint Jane Frances was being removed before it could be moved, this is now handled correctly)
Expand Down

0 comments on commit b211e28

Please sign in to comment.