2022-06-08 01:29:43 +02:00
|
|
|
class FeedMeta {
|
|
|
|
constructor(meta) {
|
|
|
|
this.title = null
|
|
|
|
this.description = null
|
|
|
|
this.author = null
|
|
|
|
this.imageUrl = null
|
|
|
|
this.feedUrl = null
|
|
|
|
this.link = null
|
2022-06-08 02:25:14 +02:00
|
|
|
this.explicit = null
|
2023-02-22 19:22:52 +01:00
|
|
|
this.type = null
|
2023-02-23 01:33:04 +01:00
|
|
|
this.language = null
|
2023-02-25 14:20:26 +01:00
|
|
|
this.preventIndexing = null
|
|
|
|
this.ownerName = null
|
|
|
|
this.ownerEmail = null
|
2022-06-08 01:29:43 +02:00
|
|
|
|
|
|
|
if (meta) {
|
|
|
|
this.construct(meta)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
construct(meta) {
|
|
|
|
this.title = meta.title
|
|
|
|
this.description = meta.description
|
|
|
|
this.author = meta.author
|
|
|
|
this.imageUrl = meta.imageUrl
|
|
|
|
this.feedUrl = meta.feedUrl
|
|
|
|
this.link = meta.link
|
2022-06-08 02:25:14 +02:00
|
|
|
this.explicit = meta.explicit
|
2023-02-22 19:22:52 +01:00
|
|
|
this.type = meta.type
|
2023-02-23 01:33:04 +01:00
|
|
|
this.language = meta.language
|
2023-02-25 14:20:26 +01:00
|
|
|
this.preventIndexing = meta.preventIndexing
|
|
|
|
this.ownerName = meta.ownerName
|
|
|
|
this.ownerEmail = meta.ownerEmail
|
2022-06-08 01:29:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
toJSON() {
|
|
|
|
return {
|
|
|
|
title: this.title,
|
|
|
|
description: this.description,
|
|
|
|
author: this.author,
|
|
|
|
imageUrl: this.imageUrl,
|
|
|
|
feedUrl: this.feedUrl,
|
2022-06-08 02:25:14 +02:00
|
|
|
link: this.link,
|
2023-02-22 19:22:52 +01:00
|
|
|
explicit: this.explicit,
|
2023-02-23 01:33:04 +01:00
|
|
|
type: this.type,
|
2023-02-25 14:20:26 +01:00
|
|
|
language: this.language,
|
|
|
|
preventIndexing: this.preventIndexing,
|
|
|
|
ownerName: this.ownerName,
|
|
|
|
ownerEmail: this.ownerEmail
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
toJSONMinified() {
|
|
|
|
return {
|
|
|
|
title: this.title,
|
|
|
|
description: this.description,
|
|
|
|
preventIndexing: this.preventIndexing,
|
|
|
|
ownerName: this.ownerName,
|
|
|
|
ownerEmail: this.ownerEmail
|
2022-06-08 01:29:43 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-02-22 19:22:52 +01:00
|
|
|
module.exports = FeedMeta
|