/*!
 * node-gcm
 * Copyright(c) 2013 Marcus Farkas <toothlessgear@finitebox.com>
 * MIT Licensed
 */
var SenderBase = require('./SenderBase');
var req = require('request');

function Sender(key, options) {
    if (!(this instanceof Sender)) {
        return new Sender(key, options);
    }

    this.req = req;
    SenderBase.call(this, key, options);
}

Sender.prototype = Object.create(SenderBase.prototype);
Sender.prototype.constructor = Sender;

Sender.prototype.sendNoRetry = function(message, registrationIds, callback) {
    var recipient = {registrationIds: registrationIds};
    return this.sendBaseNoRetry(message, recipient, callback);
};

Sender.prototype.send = function(message, registrationIds, retries, callback) {
    var recipient = {registrationIds: registrationIds};
    return this.sendBase(message, recipient, retries, callback);
};

module.exports = Sender;
@@ -1,84 +1,84 @@
 /*
-!%0A * node-gcm%0A * Copyright(c) 2013 Marcus Farkas %3Ctoothlessgear@finitebox.com%3E
+ spire-fcm%0A * David Hunt %3Cdavid@spire.me%3E%0A * Copyright(c) 2017 Spire Labs, Inc
 %0A * 
@@ -94,19 +94,21 @@
 sed%0A */%0A
-var
+const
  SenderB
@@ -142,742 +142,300 @@
 ');%0A
-var req = require('request');%0A%0Afunction Sender(key, options) %7B%0A    if (!(this instanceof Sender)) %7B%0A        return new Sender(key, options);%0A    %7D%0A%0A    this.req = req;%0A    SenderBase.call(this, key, options);%0A%7D%0A%0ASender.prototype = Object.create(SenderBase.prototype);%0ASender.prototype.constructor = Sender;%0A%0ASender.prototype.sendNoRetry = function(message, registrationIds, callback) %7B%0A    var recipient = %7BregistrationIds: registrationIds%7D;%0A    return this.sendBaseNoRetry(message, recipient, callback);%0A%7D;%0A%0ASender.prototype.send = function(message, registrationIds, retries, callback) %7B%0A    var recipient = %7BregistrationIds: registrationIds%7D;%0A    return this.sendBase(message, recipient, retries, callback);%0A%7D;%0A%0Amodule.exports = Sender
+%0Amodule.exports = class extends SenderBase %7B%0A  sendNoRetry(message, tokens, callback) %7B%0A    return this.sendBaseNoRetry(message, %7B tokens %7D).asCallback(callback):%0A  %7D%0A%0A  send(message, tokens, retries, callback) %7B%0A    return this.sendBase(message, %7B tokens %7D, retries).asCallback(callback);%0A  %7D%0A%7D
 ;

refactored sender into Sender