1.1.1 • Published 9 years ago

wanikani-emitter v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

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