@hebcal/rest-api 3.13.0 → 3.14.1
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.
- package/README.md +32 -8
- package/dist/bundle.js +457 -398
- package/dist/bundle.min.js +2 -2
- package/dist/index.js +48 -37
- package/dist/index.mjs +48 -38
- package/package.json +12 -12
- package/rest-api.d.ts +12 -10
package/README.md
CHANGED
|
@@ -32,6 +32,8 @@ console.log(JSON.stringify(csv));
|
|
|
32
32
|
## Functions
|
|
33
33
|
|
|
34
34
|
<dl>
|
|
35
|
+
<dt><a href="#locationToPlainObj">locationToPlainObj(location)</a> ⇒ <code>string</code></dt>
|
|
36
|
+
<dd></dd>
|
|
35
37
|
<dt><a href="#makeAnchor">makeAnchor(s)</a> ⇒ <code>string</code></dt>
|
|
36
38
|
<dd><p>Helper function to transform a string to make it more usable in a URL or filename.
|
|
37
39
|
Converts to lowercase and replaces non-word characters with hyphen ('-').</p>
|
|
@@ -88,13 +90,24 @@ Converts to lowercase and replaces non-word characters with hyphen ('-')
|
|
|
88
90
|
<dd></dd>
|
|
89
91
|
<dt><a href="#eventsToRss2">eventsToRss2(events, options)</a> ⇒ <code>string</code></dt>
|
|
90
92
|
<dd></dd>
|
|
91
|
-
<dt><a href="#
|
|
93
|
+
<dt><a href="#eventToRssItem2">eventToRssItem2(ev, options)</a> ⇒ <code>string</code></dt>
|
|
94
|
+
<dd></dd>
|
|
95
|
+
<dt><a href="#eventToRssItem">eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl, [options])</a> ⇒ <code>string</code></dt>
|
|
92
96
|
<dd></dd>
|
|
93
97
|
<dt><a href="#eventToFullCalendar">eventToFullCalendar(ev, tzid, il)</a> ⇒ <code>Object</code></dt>
|
|
94
98
|
<dd><p>Converts a Hebcal event to a FullCalendar.io object</p>
|
|
95
99
|
</dd>
|
|
96
100
|
</dl>
|
|
97
101
|
|
|
102
|
+
<a name="locationToPlainObj"></a>
|
|
103
|
+
|
|
104
|
+
## locationToPlainObj(location) ⇒ <code>string</code>
|
|
105
|
+
**Kind**: global function
|
|
106
|
+
|
|
107
|
+
| Param | Type |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| location | <code>Location</code> |
|
|
110
|
+
|
|
98
111
|
<a name="makeAnchor"></a>
|
|
99
112
|
|
|
100
113
|
## makeAnchor(s) ⇒ <code>string</code>
|
|
@@ -118,7 +131,7 @@ makeAnchor('Rosh Chodesh Adar II') // 'rosh-chodesh-adar-ii'
|
|
|
118
131
|
|
|
119
132
|
| Param | Type |
|
|
120
133
|
| --- | --- |
|
|
121
|
-
| options | <code>
|
|
134
|
+
| options | <code>CalOptions</code> |
|
|
122
135
|
|
|
123
136
|
<a name="pad2"></a>
|
|
124
137
|
|
|
@@ -210,7 +223,7 @@ Generates a title like "Hebcal 2020 Israel" or "Hebcal May 1993 Providence"
|
|
|
210
223
|
| Param | Type |
|
|
211
224
|
| --- | --- |
|
|
212
225
|
| events | <code>Array.<Event></code> |
|
|
213
|
-
| options | <code>
|
|
226
|
+
| options | <code>CalOptions</code> |
|
|
214
227
|
|
|
215
228
|
<a name="getHolidayDescription"></a>
|
|
216
229
|
|
|
@@ -261,7 +274,7 @@ Renders an Event as a string
|
|
|
261
274
|
| Param | Type |
|
|
262
275
|
| --- | --- |
|
|
263
276
|
| e | <code>Event</code> |
|
|
264
|
-
| options | <code>
|
|
277
|
+
| options | <code>CalOptions</code> |
|
|
265
278
|
|
|
266
279
|
<a name="eventsToCsv"></a>
|
|
267
280
|
|
|
@@ -283,7 +296,7 @@ Formats a list events for the classic Hebcal.com JSON API response
|
|
|
283
296
|
| Param | Type | Default |
|
|
284
297
|
| --- | --- | --- |
|
|
285
298
|
| events | <code>Array.<Event></code> | |
|
|
286
|
-
| options | <code>
|
|
299
|
+
| options | <code>CalOptions</code> | |
|
|
287
300
|
| [leyning] | <code>boolean</code> | <code>true</code> |
|
|
288
301
|
|
|
289
302
|
<a name="eventToClassicApiObject"></a>
|
|
@@ -296,7 +309,7 @@ Converts a Hebcal event to a classic Hebcal.com JSON API object
|
|
|
296
309
|
| Param | Type | Default |
|
|
297
310
|
| --- | --- | --- |
|
|
298
311
|
| ev | <code>Event</code> | |
|
|
299
|
-
| options | <code>
|
|
312
|
+
| options | <code>CalOptions</code> | |
|
|
300
313
|
| [leyning] | <code>boolean</code> | <code>true</code> |
|
|
301
314
|
|
|
302
315
|
<a name="formatAliyot"></a>
|
|
@@ -340,11 +353,21 @@ Converts a Hebcal event to a classic Hebcal.com JSON API object
|
|
|
340
353
|
| Param | Type |
|
|
341
354
|
| --- | --- |
|
|
342
355
|
| events | <code>Array.<Event></code> |
|
|
343
|
-
| options | <code>
|
|
356
|
+
| options | <code>CalOptions</code> |
|
|
357
|
+
|
|
358
|
+
<a name="eventToRssItem2"></a>
|
|
359
|
+
|
|
360
|
+
## eventToRssItem2(ev, options) ⇒ <code>string</code>
|
|
361
|
+
**Kind**: global function
|
|
362
|
+
|
|
363
|
+
| Param | Type |
|
|
364
|
+
| --- | --- |
|
|
365
|
+
| ev | <code>Event</code> |
|
|
366
|
+
| options | <code>CalOptions</code> |
|
|
344
367
|
|
|
345
368
|
<a name="eventToRssItem"></a>
|
|
346
369
|
|
|
347
|
-
## eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl) ⇒ <code>string</code>
|
|
370
|
+
## eventToRssItem(ev, evPubDate, lastBuildDate, dayFormat, location, mainUrl, [options]) ⇒ <code>string</code>
|
|
348
371
|
**Kind**: global function
|
|
349
372
|
|
|
350
373
|
| Param | Type |
|
|
@@ -355,6 +378,7 @@ Converts a Hebcal event to a classic Hebcal.com JSON API object
|
|
|
355
378
|
| dayFormat | <code>Intl.DateTimeFormat</code> |
|
|
356
379
|
| location | <code>Location</code> |
|
|
357
380
|
| mainUrl | <code>string</code> |
|
|
381
|
+
| [options] | <code>CalOptions</code> |
|
|
358
382
|
|
|
359
383
|
<a name="eventToFullCalendar"></a>
|
|
360
384
|
|