PostBuffer

Data structure to manage post merging to prevent spamming

License: MIT

PostBuffer~PostBuffer(delay, callback)

Create a new PostBuffer

Kind: inner method of PostBuffer

Param Type Description
delay number Buffering time before posting
callback postBufferCallback Buffer delay expiry callback

postBuffer.add(topicId, [replyTo], content, callback)

Add details of a post to buffer

Kind: instance method of PostBuffer

Param Type Description
topicId number Topic to post to
[replyTo] number Post Number in topic that this post is in reply to
content string Post Contents to post
callback postedCallback Completion callback

PostBuffer~postBufferCallback

PostBuffer Callback

Kind: inner typedef of PostBuffer
See: add for more information about the members of key and values

Param Type Description
key Object Contains the members topicId and replyTo
values Object Array of objects with the members content and callback