An interface of Tsinghua University Network for JavaScript
Simple as npm install tsinghua-university-network
!
login(username, password, callback)
callback
will be called as callback(error, dataUsage)
, where dataUsage
represents gigabytes used so far this month.
getActiveConnections(username, password, callback)
callback
will be called as callback(error, listOfClients)
, where listOfClients
is of style [{ip: ..., checksum: ...}, ...]
.
logout(username, password, ip, checksum, callback)
callback
will be calle das callback(error)
. Yes, ip
and checksum
would be best chained with getActiveConnections
.