typingdnaclient-rxjs
v1.2.0
Published
RxJS wrapper for the TypingDna API
Downloads
8
Maintainers
Readme
typingdnaclient-rxjs
RxJS wrapper for the TypingDna API
Installation
npm install typingdnaclient-rxjs --save
Instantiation and Usage
import { TypingDNAReactiveClient } from 'typingdnaclient-rxjs';
const client = new TypingDNAReactiveClient(apiKey, apiSecret);
client.verify(userId, pattern).subscribe(console.log, console.error);
The default TypingDNA API Server is api.typingdna.com
.
You can use the alternative server tdna-api.azurewebsites.net
.
const server = 'tdna-api.azurewebsites.net';
const client = new TypingDNAReactiveClient(apiKey, apiSecret, server);
Available Methods
class TypingDNAReactiveClient {
auto(
userId: string,
typingPattern: string,
options?: { customField: any }
): Observable<AutoResponse>;
save(userId: string, typingPattern: string): Observable<any>;
verify(
userId: string,
typingPattern: string,
quality: number,
options: { deviceSimilarityOnly: boolean }
): Observable<VerifyResponse>;
}