Basic node.js wrapper for the TypingDna API
Instantiate client
var TypingDnaClient = require('typingdnaclient');
var typingDnaClient = new TypingDnaClient('apiKey', 'apiSecret');
The default TypingDNA API Server is api.typingdna.com. You can use the alternative server tdna-api.azurewebsites.net.
var typingDnaClient = new TypingDnaClient('apiKey', 'apiSecret','tdna-api.azurewebsites.net');
Usage example
Get the previously saved typing patterns count for a user:
typingDnaClient.check(
{ userId : 'userID',
type: '2',
device: 'desktop'
},
function(error, result) {
if (error) { console.error(error) }
console.log(result);
});
Available Methods
typingDnaClient.check(options, callback);
typingDnaClient.auto(userId, typingPattern, callback);
typingDnaClient.save(userId, typingPattern, callback);
typingDnaClient.delete(options, callback);
typingDnaClient.verify(userId, typingPattern, quality, callback);
typingDnaClient.match(typingPattern1, typingPattern2, quality, callback);
typingDnaClient.getQuote(minLength, maxLength, callback);
typingDnaClient.server(serverName);
typingDnaClient.requestTimeout(timeout);
Documentation
License
Apache-2.0