nl_tokens: Sendpulse API initialization
pl_tokens: function init ( user_id , secret , storage , callback ) { API_USER_ID = user_id ; API_SECRET = secret ; TOKEN_STORAGE = storage ; if ( ! <mask> ) { 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 ) }