update readme + more comments
This commit is contained in:
@ -6,7 +6,8 @@ const DEFAULT_TIMELOOP: number = 5 * 60; // default timeloop is 5 min
|
||||
|
||||
/**
|
||||
* Emit 'update' when he's making a fetch during the start fun
|
||||
* Emit 'update_err' when the fetch has an issue
|
||||
* Emit 'error' when the fetch has an issue
|
||||
* Emit 'newEntries' when the fetch has new entris
|
||||
*/
|
||||
export class ListenerRss extends EventEmitter {
|
||||
name: string = "";
|
||||
@ -21,7 +22,7 @@ export class ListenerRss extends EventEmitter {
|
||||
|
||||
/**
|
||||
* @brief constructor
|
||||
* @param config ListenerRSSInfos interface who's contain the ListenerInfos
|
||||
* @param config ListenerRSSInfos interface who contains the ListenerInfos
|
||||
*/
|
||||
constructor(config: ListenerInfo) {
|
||||
super();
|
||||
@ -36,7 +37,7 @@ export class ListenerRss extends EventEmitter {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Private function. Is useed to initilize the parser object with the customfields var
|
||||
* @brief Private function. Is used to initilize the parser object with the customfields var
|
||||
*/
|
||||
generateParser() {
|
||||
const parserConfig = this.customfields && {
|
||||
@ -51,7 +52,7 @@ export class ListenerRss extends EventEmitter {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief use the parseURL function from rss-parser with the objects datas
|
||||
* @brief use the parseURL function from rss-parser with the objects data
|
||||
* @return return a promise with the received data
|
||||
*/
|
||||
fetchRSS(): Promise<Parser.Output<any>> {
|
||||
@ -60,7 +61,6 @@ export class ListenerRss extends EventEmitter {
|
||||
|
||||
/**
|
||||
* @brief call the callback function each looptime
|
||||
* @param callback function who's going to be called with the latest get
|
||||
*/
|
||||
start(): void {
|
||||
this.loopRunning = true;
|
||||
|
Reference in New Issue
Block a user