From a91b291bc22f96842b93c7f8d197a67f74f2febb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Belin?= Date: Thu, 23 Mar 2017 21:39:46 +0100 Subject: [PATCH] Fixed the `Client` class --- src/client.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/client.js b/src/client.js index 5af6a00d..8ddef7f7 100644 --- a/src/client.js +++ b/src/client.js @@ -1,12 +1,14 @@ -import {Blog} from './blog'; -import * as pkg from '../package.json'; +import EventEmitter from 'events'; import superagent from 'superagent'; import url from 'url'; +import {Blog} from './blog'; +import * as pkg from '../package.json'; + /** * Submits comments to the [Akismet](https://akismet.com) service. */ -export class Client { +export class Client extends EventEmitter { /** * The HTTP header containing the Akismet error messages. @@ -30,6 +32,7 @@ export class Client { * @param {Blog|string} [blog] The front page or home URL of the instance making requests. */ constructor(apiKey = '', blog = null) { + super(); /** * The Akismet API key.