npm.io
1.1.1 • Published 11 years ago

wanikani-emitter

Licence
MIT
Version
1.1.1
Deps
3
Vulns
1
Weekly
0
Stars
1

wanikani-notifier

Core functions for wanikani-notifier.

Usage

See the usage instructions for wanikani-notifier for details.

Inheritance

WaniKaniEmitter inherits from EventEmitter. However, no fields such as listener count are touched.

API
new WaniKaniEmitter(config)
  • config.key
  • config.errorSuspendDuration
  • config.notifiedSuspendDuration
  • config.waitingSuspendDuration
  • config.dashboardOnBothPending
  • config.minilag
emitter.start() : Promise
emitter.stop()
WaniKaniEmitter.stop
Private methods
  • emitter.process() : Promise
  • WaniKaniEmitter.scheduleNextCheck : int
  • WaniKaniEmitter.requestUri(uri: string) : Promise - denodeified request function.
Events
error

Will be emitted when an error is encountered. Important note: The emitter will continue running whatever error occurs, except for:

  • API errors, which are tagged with err.WaniKaniEmitter_type = 'APIError'.

License

MIT

Keywords