function init(user_id, secret, storage, callback) {
    API_USER_ID = user_id;
    API_SECRET = secret;
    TOKEN_STORAGE = storage;

    if (!callback) {
        callback = function() {}
    }

    if (!fs.existsSync(TOKEN_STORAGE)) {
        mkdirSyncRecursive(TOKEN_STORAGE);
    }

    if (TOKEN_STORAGE.substr(-1) !== '/') {
        TOKEN_STORAGE += '/';
    }

    var hashName = md5(API_USER_ID+'::'+API_SECRET);
    if (fs.existsSync(TOKEN_STORAGE+hashName)) {
        TOKEN = fs.readFileSync(TOKEN_STORAGE+hashName,{encoding:'utf8'});
    }

    if (! TOKEN.length) {
        getToken(callback);
        return;
    }

    callback(TOKEN)
}
function init(user_id, secret, storage, callback) {
    API_USER_ID = user_id;
    API_SECRET = secret;
    TOKEN_STORAGE = storage;

    if (!callback) {
        callback = function() {}
    }

    if (!fs.existsSync(TOKEN_STORAGE)) {
        mkdirSyncRecursive(TOKEN_STORAGE);
    }

    if (TOKEN_STORAGE.substr(-1) !== '/') {
        TOKEN_STORAGE += '/';
    }

    var hashName = md5(API_USER_ID+'::'+API_SECRET);
    if (fs.existsSync(TOKEN_STORAGE+hashName)) {
        TOKEN = fs.readFileSync(TOKEN_STORAGE+hashName,{encoding:'utf8'});
    }

    if (! TOKEN.length) {
        getToken(callback);
        return;
    }

    callback(TOKEN)
}
function init ( user_id , secret , storage , callback ) { API_USER_ID = user_id ; API_SECRET = secret ; TOKEN_STORAGE = storage ; if ( ! callback ) { callback = function ( ) { } } if ( ! fs . existsSync ( TOKEN_STORAGE ) ) { mkdirSyncRecursive ( TOKEN_STORAGE ) ; } if ( TOKEN_STORAGE . substr ( - 1 ) !== '/' ) { TOKEN_STORAGE += '/' ; } var hashName = md5 ( API_USER_ID + '::' + API_SECRET ) ; if ( fs . existsSync ( TOKEN_STORAGE + hashName ) ) { TOKEN = fs . readFileSync ( TOKEN_STORAGE + hashName , { encoding : 'utf8' } ) ; } if ( ! TOKEN . length ) { getToken ( callback ) ; return ; } callback ( TOKEN ) }
Sendpulse API initialization

@param user_id
@param secret
@param storage
@param callback
Sendpulse API initialization