Created
July 2, 2019 04:26
-
-
Save chibenwa/6d73cb74525348ec58356453462fe830 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default class BodyBuilder { | |
constructor() { | |
this.result = []; | |
} | |
appendGetMessageList(options, name = '#0') { | |
this.append('getMessageList', options, name); | |
return this; | |
} | |
appendGetMessages(options, name = '#0') { | |
this.append('getMessages', options, name); | |
return this; | |
} | |
append(method, options, name) { | |
this.result.push([method, options, name]); | |
} | |
getBody() { | |
return this.result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment