kwent / syno

Simple Node.js wrapper and CLI for Synology DSM REST API 5.x and 6.x.
http://kwent.github.io/syno
MIT License
319 stars 51 forks source link

how to call surveillance Station Face Result API #64

Open celevra opened 3 years ago

celevra commented 3 years ago

Hi,

how to run this API Call:

GET /webapi/entry.cgi?
api="SYNO.SurveillanceStation.Face.Result"&version="1"&method="List"&blIncludeSnapshot=false&blInclu
deRegisteredFace=false&filter={"start_date_ts":1593446400000,
"end_date_ts":1594051200000,"ignore_bad_quality":true}&limit=1&&slaveDsParam={"0":
{"max_id":88731, "start":0}}

described here on Page 540 https://global.download.synology.com/download/Document/Software/DeveloperGuide/Package/SurveillanceStation/All/enu/Surveillance_Station_Web_API.pdf

thried this:

syno.ss.Face.Result({'method':'List','blIncludeSnapshot': true, 'blIncludeRegisteredFace': true}, function(err,res){
    console.log(res)
});

with this result:

/node/faces.js:22
syno.ss.Face.Result({'method':'List','blIncludeSnapshot': true, 'blIncludeRegisteredFace': true}, function(err,res){
             ^

TypeError: Cannot read property 'Result' of undefined
    at Object.<anonymous> (/node/faces.js:22:14)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
dotWee commented 3 years ago

Did you get it to work?

Since those are newer API methods and this library a bit outdated, you probably need to research & add the Face API definitions to SurveillanceStation.api.