diff --git a/src/Models/ListenerRSSInfos.js b/src/Models/ListenerRSSInfos.js new file mode 100644 index 0000000..6259838 --- /dev/null +++ b/src/Models/ListenerRSSInfos.js @@ -0,0 +1,42 @@ +class ListenerRSSInfos { + _name = undefined; // name of the listener + _address = undefined; // feed's address + _timeloop = 5 * 60; // update time RSS feed + _customfields = [] // rss fields custom + + + constructor(name, address, timeloop, customfields) { + if(name !== undefined && address !== undefined) { + this._name = name; + this._address = address; + this._timeloop = timeloop; + this._customfields = customfields; + } else throw new Error('Bad constructor\'s args'); + } + + set timeloop(value) { + this._timeloop = value; + } + + set customfields(value) { + this._customfields = value; + } + + get name() { + return this._name; + } + + get address() { + return this._address; + } + + get timeloop() { + return this._timeloop; + } + + get customfields() { + return this._customfields; + } +} + +module.exports = ListenerRSSInfos; \ No newline at end of file