overrustle-logs-url
v2.0.3
Published
Get the URL to OverRustle logs
Downloads
22
Readme
overrustle-logs-url
Get the URL to OverRustle logs.
Example
var overrustleLogsUrl = require('overrustle-logs-url');
overrustleLogsUrl({channel: 'destinygg', date: '2015-10-27'});
// => 'https://overrustlelogs.net/Destinygg%20chatlog/October%202015/2015-10-27.txt'
Installation
$ npm install overrustle-logs-url
API
var overrustleLogsUrl = require('overrustle-logs-url');
overrustleLogsUrl(opts)
Returns a String URL that points to the logfile hosted at OverRustle based on
Object opts
:
opts.channel
: String name of channel to download logs of. This is non-optional unlessopts.short
istrue
, in which case'destingg'
is assumed.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 bymoment
(just use the ISO-8601 standard). This is non-optional unlessopts.short
istrue
, in which case there is absolutely no need for this.opts.user
: String username of user you want to download logs of. This is optional, unlessopts.short
istrue
in which case you really should setopts.user
, otherwise you will get a URL to the directory of the logfiles rather than a particular logfile itself.opts.short
: Boolean whether or not you would like the "short" URL (where the domain isdgg.overrustlelogs.net
) which points specifically to logfiles foropts.channel = 'destinygg'
. This is optional.