-
2019/12/30 APIKey is supported. For new AR Cloud and EasyAR SDK 4.x
-
2018/08/24 Upgrade with new authentication for EasyAR CRS Cloud 3.0 API, and more APIs are opened for managing databases.
-
2018/08/07 NodeJS SDK v1.0 for EasyAR CRS Cloud.
CRUD for targets
function farmerClient(host, appKey, appSecret)
function ping()
function getTargets()
function getTargetsCount()
function createTarget(target)
function getTarget(targetId)
function updateTarget(targetId, data)
function deleteTarget(targetId)
function similar(image)
function getDetectionGrade(image)
function getTrackingGrade(image)
Searching of targets
function gatewayClient(host, appKey, appSecret)
function ping()
function search(image)
function createTunnel()
function searchViaTunnel(tunnel, image)
function searchViaTunnelOnHost(host, tunnel, image)
var farmer = sdk.farmer('http://localhost:8888', 'test_app_key', 'test_app_secret');
farmer.createTarget({
'egg': 'spam',
'image': fs.readFileSync('test.jpg').toString('base64')
})
.then(function(resp) {
console.log(resp.result.targetId);
})
.fail(function(err) {
console.log(err);
});
var gateway = sdk.gateway('http://localhost:8080', 'test_app_key', 'test_app_secret');
gateway.createTunnel()
.then(function(resp) {
var tunnel = resp.result.tunnel;
var image = {
'foo': 'bar',
'image': fs.readFileSync('test.jpg')
};
return gateway.searchViaTunnel(tunnel, image);
})
.then(function(resp) {
console.log(resp.result.target.targetId);
})
.fail(function(err) {
console.log(err);
});
Usage: addTarget [image] -t [host] -c [keys]
Options:
-h, --help Show help [boolean]
-t, --host [default: "http://localhost:8888"]
-c, --keys [default: "keys.json"]
copyright 2015, sightp.com
Usage: getTarget [targetId] -t [host] -c [keys]
Options:
-h, --help Show help [boolean]
-t, --host [default: "http://localhost:8888"]
-c, --keys [default: "keys.json"]
copyright 2015, sightp.com
Usage: searchTarget [image] -t [host] -c [keys]
Options:
-h, --help Show help [boolean]
-t, --host [default: "http://localhost:8080"]
-c, --keys [default: "keys.json"]
copyright 2015, sightp.com
Usage: deleteTarget [targetId] -t [host] -c [keys]
Options:
-h, --help Show help [boolean]
-t, --host [default: "http://localhost:8888"]
-c, --keys [default: "keys.json"]
copyright 2015, sightp.com