rets-client
Advanced tools
Comparing version
14
index.js
@@ -128,10 +128,4 @@ var logger = require('winston'), | ||
baseRetsSession = request.defaults(defaults); | ||
var options = { | ||
uri:settings.loginUrl | ||
}; | ||
if (settings.username && settings.password) { | ||
options.auth = { | ||
defaults.auth = { | ||
'user': settings.username, | ||
@@ -143,2 +137,8 @@ 'pass': settings.password, | ||
baseRetsSession = request.defaults(defaults); | ||
var options = { | ||
uri:settings.loginUrl | ||
}; | ||
auth.login(baseRetsSession.defaults(options), function(error, systemData) { | ||
@@ -145,0 +145,0 @@ if (error) { |
{ | ||
"name": "rets-client", | ||
"version": "1.1.10", | ||
"version": "1.1.11", | ||
"description": "A RETS client (Real Estate Transaction Standard).", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
19
test.js
var rets = require('./index.js'); | ||
var assert = require('chai').assert; | ||
var client = rets.getClientWithRetsVersion("http://ptest.mris.com:6103/ptest/login", "MRISTEST", "PMRISTEST", "RETS/1.8.0"); | ||
var client = rets.getClientFromSettings( | ||
{ | ||
loginUrl:"http://ptest.mris.com:6103/ptest/login", | ||
username:"MRISTEST", | ||
password:"PMRISTEST", | ||
version:"RETS/1.8.0", | ||
userAgent:"RETS Test/1.0" | ||
}); | ||
@@ -31,7 +38,7 @@ client.once('connection.success', function(){ | ||
client.logout(); | ||
client.once("logout.success", function(){ | ||
done(); | ||
}); | ||
//client.logout(); | ||
// | ||
//client.once("logout.success", function(){ | ||
// done(); | ||
//}); | ||
}); |
99494
0.13%2281
0.35%