17 lines
375 B
JavaScript
17 lines
375 B
JavaScript
class Updater {
|
|
archiveURL;
|
|
feedType;
|
|
constructor(archiveURL = "/", feedType = "rss") {
|
|
this.archiveURL = archiveURL;
|
|
this.feedType = feedType;
|
|
}
|
|
async getArchive() {
|
|
const res = await fetch(`${this.archiveURL}.${this.feedType}`, {
|
|
"mode": "cors"
|
|
});
|
|
return res;
|
|
}
|
|
}
|
|
|
|
export { Updater as default };
|