geezsms
Version:
GeezSMS Typscript wrapper.
25 lines (24 loc) • 880 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var axios_1 = require("axios");
var single_1 = require("./single");
var GeezSMS = /** @class */ (function () {
function GeezSMS(apikey) {
this.DEFAULT_HOST = 'https://api.geezsms.com/api';
this.PACKAGE_VERSION = '1.0.0';
this.DEFAULT_TIMEOUT = 1000 * 60 * 2;
this.apiKey = apikey;
this._httpClient = axios_1.default.create({
baseURL: "".concat(this.DEFAULT_HOST),
timeout: this.DEFAULT_TIMEOUT,
headers: {
'X-GeezSMS-Key': apikey,
},
});
this.single = new single_1.default(this._httpClient);
// TODO: add bulk support and otp support
// this.bulk = new BulkSMS(this._httpClient);
}
return GeezSMS;
}());
exports.default = GeezSMS;