v1.1.1
This commit is contained in:
parent
b4288b2abb
commit
b2646e5aa1
16
README.md
16
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
|
- 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
|
- 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)
|
- 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)
|
- 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
|
- 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
|
- 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
|
- 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
|
#### Paging
|
||||||
`pageSize`
|
`page_size`
|
||||||
- returns at most pageSize number of holidays
|
- 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
|
- only applied if page is defined as well, by default set to 20
|
||||||
|
|
||||||
`page`
|
`page`
|
||||||
|
|
|
@ -44,10 +44,10 @@ window.addEventListener('load', () => {
|
||||||
query['country'] = country.value;
|
query['country'] = country.value;
|
||||||
query['contentType'] = contentType.value;
|
query['contentType'] = contentType.value;
|
||||||
if(stateHoliday.value === 'true' || stateHoliday.value === 'false') {
|
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') {
|
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);
|
console.log(dateSelector.value, dStartRange.value, dEndRange.value);
|
||||||
switch(dateSelector.value) {
|
switch(dateSelector.value) {
|
||||||
|
@ -61,10 +61,10 @@ window.addEventListener('load', () => {
|
||||||
break;
|
break;
|
||||||
case 'range':
|
case 'range':
|
||||||
if(dStartRange.value) {
|
if(dStartRange.value) {
|
||||||
query['startRange'] = dStartRange.value;
|
query['range_start'] = dStartRange.value;
|
||||||
}
|
}
|
||||||
if(dEndRange.value) {
|
if(dEndRange.value) {
|
||||||
query['endRange'] = dEndRange.value;
|
query['range_end'] = dEndRange.value;
|
||||||
}
|
}
|
||||||
case 'all':
|
case 'all':
|
||||||
default:
|
default:
|
||||||
|
@ -78,10 +78,10 @@ window.addEventListener('load', () => {
|
||||||
query['country'] = country.value;
|
query['country'] = country.value;
|
||||||
query['type'] = contentType.value;
|
query['type'] = contentType.value;
|
||||||
if(stateHoliday.value === 'true' || stateHoliday.value === 'false') {
|
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') {
|
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);
|
console.log(dateSelector.value, dStartRange.value, dEndRange.value);
|
||||||
switch(dateSelector.value) {
|
switch(dateSelector.value) {
|
||||||
|
@ -95,10 +95,10 @@ window.addEventListener('load', () => {
|
||||||
break;
|
break;
|
||||||
case 'range':
|
case 'range':
|
||||||
if(dStartRange.value) {
|
if(dStartRange.value) {
|
||||||
query['startRange'] = dStartRange.value;
|
query['range_start'] = dStartRange.value;
|
||||||
}
|
}
|
||||||
if(dEndRange.value) {
|
if(dEndRange.value) {
|
||||||
query['endRange'] = dEndRange.value;
|
query['range_end'] = dEndRange.value;
|
||||||
}
|
}
|
||||||
case 'all':
|
case 'all':
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
### v1.0.1
|
||||||
|
* Updated api documentation page
|
||||||
|
* Updated README.md
|
Loading…
Reference in New Issue