From b2646e5aa17e392a42b74d72417be8f6fda17c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Borna=20Rajkovi=C4=87?= Date: Thu, 8 Aug 2024 14:02:45 +0200 Subject: [PATCH] v1.1.1 --- README.md | 16 ++++++++-------- assets/documentation.js | 16 ++++++++-------- changelog.md | 3 +++ 3 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 changelog.md diff --git a/README.md b/README.md index 3016296..51369c3 100644 --- a/README.md +++ b/README.md @@ -28,25 +28,25 @@ That endpoint accepts a list of required and optional parameters - if defined year and rangeStart|rangeEnd parameters are ignored -`rangeStart|rangeEnd` +`range_start|range_end` - returns holidays in given range with both ends being inclusive - if either limit isn't defined it is assumed to be up to or all from given limit (if rangeStart isn't defined all holidays before rangeEnd are returned and vice-verse) - dates must be formatted in ISO 8601 format [more info here](https://www.iso.org/iso-8601-date-and-time-format.html) - - eg. `rangeStart=2021-12-25&rangeEnd=2023-01-23`, `rangeStart=2023-01-20` + - eg. `range_start=2021-12-25&range_end=2023-01-23`, `range_start=2023-01-20` - if defined year parameter is ignored -`stateHoliday` +`state_holiday` - if set true only holidays that are tagged as state holidays are returned, similar for if set false, if not set all holidays are returned - - eg. `stateHoliday=true`, `stateHoliday=false` + - eg. `state_holiday=true`, `state_holiday=false` -`religiousHoliday` +`religious_holiday` - if set true only holidays that are tagged as religious holidays are returned, similar for if set false, if not set all holidays are returned - - eg. `religiousHoliday=true`, `religiousHoliday=false` + - eg. `religious_holiday=true`, `religious_holiday=false` #### Paging -`pageSize` +`page_size` - returns at most pageSize number of holidays - - eg. `pageSize=20` + - eg. `page_size=20` - only applied if page is defined as well, by default set to 20 `page` diff --git a/assets/documentation.js b/assets/documentation.js index 255d6fb..35120f2 100644 --- a/assets/documentation.js +++ b/assets/documentation.js @@ -44,10 +44,10 @@ window.addEventListener('load', () => { query['country'] = country.value; query['contentType'] = contentType.value; if(stateHoliday.value === 'true' || stateHoliday.value === 'false') { - query['stateHoliday'] = parseBoolean(stateHoliday.value); + query['state_holiday'] = parseBoolean(stateHoliday.value); } if(religiousHoliday.value === 'true' || religiousHoliday.value === 'false') { - query['religiousHoliday'] = parseBoolean(religiousHoliday.value); + query['religious_holiday'] = parseBoolean(religiousHoliday.value); } console.log(dateSelector.value, dStartRange.value, dEndRange.value); switch(dateSelector.value) { @@ -61,10 +61,10 @@ window.addEventListener('load', () => { break; case 'range': if(dStartRange.value) { - query['startRange'] = dStartRange.value; + query['range_start'] = dStartRange.value; } if(dEndRange.value) { - query['endRange'] = dEndRange.value; + query['range_end'] = dEndRange.value; } case 'all': default: @@ -78,10 +78,10 @@ window.addEventListener('load', () => { query['country'] = country.value; query['type'] = contentType.value; if(stateHoliday.value === 'true' || stateHoliday.value === 'false') { - query['stateHoliday'] = parseBoolean(stateHoliday.value); + query['state_holiday'] = parseBoolean(stateHoliday.value); } if(religiousHoliday.value === 'true' || religiousHoliday.value === 'false') { - query['religiousHoliday'] = parseBoolean(religiousHoliday.value); + query['religious_holiday'] = parseBoolean(religiousHoliday.value); } console.log(dateSelector.value, dStartRange.value, dEndRange.value); switch(dateSelector.value) { @@ -95,10 +95,10 @@ window.addEventListener('load', () => { break; case 'range': if(dStartRange.value) { - query['startRange'] = dStartRange.value; + query['range_start'] = dStartRange.value; } if(dEndRange.value) { - query['endRange'] = dEndRange.value; + query['range_end'] = dEndRange.value; } case 'all': default: diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..3f7e405 --- /dev/null +++ b/changelog.md @@ -0,0 +1,3 @@ +### v1.0.1 +* Updated api documentation page +* Updated README.md \ No newline at end of file