Streaming download of OverRustle logs.
In this example, we get a stream of all
destiny.gg messages from a given date,
"stringify" the parsed objects with
ndjson, and finally pipe to stdout:
var logs = ;var ndjson = ;;
We can also get messages from a specific user. In this example, we will use the
'data' event just for the sake of showing how there are many ways to consume
streams in general:
var logs = ;;
$ npm install overrustle-logs
var logs = ;
Returns a Readable stream of Objects that each represent a message.
is an Object whose properties should be:
opts.channel: String name of channel to download logs of. This is non-optional.
opts.date: String date. If you are getting the entire logs of a channel, you must provide the year, month, and day. If you are getting the logs for a specific user, you only need to provide year and month. The format should be parseable by
moment(just use the ISO-8601 standard). This is non-optional.
opts.user: String username of user you want to download logs of. This is optional.
Here is an example of an Object that the stream with emit:
timestamp: '2015-10-21T23:59:59.000Z'user: 'RustleBot'message: 'YEE'