You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
411 B
34 lines
411 B
3 years ago
|
/**
|
||
|
*
|
||
|
*
|
||
|
*
|
||
|
*/
|
||
|
class Parser
|
||
|
{
|
||
|
/**
|
||
|
*
|
||
|
*
|
||
|
*/
|
||
|
constructor(body)
|
||
|
{
|
||
|
// body from webhook
|
||
|
this.body = body
|
||
|
|
||
|
// message
|
||
|
this.message = undefined
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* run parser, call parse-function and return message
|
||
|
*
|
||
|
* @return string
|
||
|
*
|
||
|
*/
|
||
|
run()
|
||
|
{
|
||
|
this.parse()
|
||
|
return this.message
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default Parser
|