mirror of
https://github.com/clarencechaan/ufc-cal.git
synced 2026-10-19 00:38:30 -07:00
Rename createICS function to createICSFromScrape to differentiate from API
This commit is contained in:
1 parent
18aa02a074
commit
2f5a30fadf
1 file changed
+5
-4
@@ -3,12 +3,13 @@ import { writeFile } from "fs/promises";
|
||||
import { createEvents } from "ics";
|
||||
|
||||
/**
|
||||
* Extracts the details of recent and near-future UFC events, then creates an
|
||||
* ICS file named "UFC.ics" in the current directory containing these events
|
||||
* Extracts the details of recent and near-future UFC events by scraping the
|
||||
* UFC website, then creates an ICS file named "UFC.ics" in the current
|
||||
* directory containing these events
|
||||
*
|
||||
* @returns {Promise<void>} - A Promise that resolves when the ICS file is created
|
||||
*/
|
||||
async function createICS() {
|
||||
async function createICSFromScrape() {
|
||||
try {
|
||||
let events = await getAllDetailedEvents();
|
||||
if (!events.length) throw new Error("No events retrieved");
|
||||
@@ -77,4 +78,4 @@ async function createICS() {
|
||||
}
|
||||
}
|
||||
|
||||
createICS();
|
||||
createICSFromScrape();
|
||||
Reference in new issue
Block a user