bulentv / js_zklib

Attendance Machine Library for NodeJS with a connection to the network using the UDP protocol and port 4370
GNU General Public License v2.0
56 stars 46 forks source link

how to get attendance data? #28

Open andrekurniawan123 opened 6 years ago

andrekurniawan123 commented 6 years ago

hello, i'm newbie here.. i want to ask how to get attendance data using getAttendance()? i already tried but getting error

ZK.getAttendance(function(err, t) { ZK.disconnect(); if (err) throw err; console.log(t.toString()); });

thanks before :)

mribichich commented 6 years ago

Remember that you have to connect before trying any function

something like this:

ZK.connect(function() {
  ZK.getAttendance(function(err, data) {
    ZK.disconnect();

    if (err) throw err; 

    console.log(data.toString());
  });
});
mribichich commented 6 years ago

@andrekurniawan123 Were you able to test this?

mribichich commented 6 years ago

@andrekurniawan123 Did you have a chance to check it out?

beeing commented 6 years ago

It is working on my side, but funny thing the id is only 4 digits?

mribichich commented 6 years ago

Great to hear that. Yeah in our products it is

On Fri, Sep 21, 2018, 02:40 Bee Ing notifications@github.com wrote:

It is working on my side, but funny thing the id is only 4 digits?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/bulentv/js_zklib/issues/28#issuecomment-423430178, or mute the thread https://github.com/notifications/unsubscribe-auth/AFe3SmO_zPwH_UJJ9ye9-ahIVZ2fJdCJks5udInugaJpZM4T-5p- .

ibrahimMH13 commented 5 years ago

how limit the data fetch ? every get data need long time so i need limit it

caobo171 commented 4 years ago

THere is no way to limit data !!

Check my repo , I've already fixed many bugs : https://github.com/caobo171/node-zklib