ng-ft-zoom-sdk
v2.2.4
Published
Angular version for zoOm cordova SDK
Downloads
54
Maintainers
Readme
ng-ft-zoom-sdk
This is the ionic/angular version of the cordova-plugin-zoom-sdk.
Installation
Plugin installation:
Cordova: cordova plugin add https://github.com/facetec/cordova-plugin-zoom-sdk
Ionic: ionic cordova plugin add https://github.com/facetec/cordova-plugin-zoom-sdk
Package installation: npm install ng-ft-zoom-sdk --save
From an existing Cordova project, run cordova plugin add https://github.com/facetec/cordova-plugin-zoom-sdk
Initialization:
import { ZoomModule, ZoomConfig } from 'ng-ft-zoom-sdk';
const zoomConfig: ZoomConfig = {
token: "YOUR_ZOOM_API_TOKEN",
logs: false
};
@NgModule({
...
imports: [
ZoomModule.forRoot(zoomConfig);
]
...
});
Injecting Provider:
import { ZoomService } from 'ng-ft-zoom-sdk';
export class MyService {
constuctor(
protected zoom: ZoomService
) {}
}
Enroll User:
import { ZoomService, EnrollCallbackResponse } from 'ng-ft-zoom-sdk';
....
constructor(
protected zoom: ZoomService
){}
enrollUser() {
this.zoom.enroll("user_id", "user_encrypted_secret").then((res: EnrollCallbackResponse) => {
console.log(res.successful ? 'User enrolled' : 'Failed to enroll user.');
}).catch(err => console.log(err));
}
Authenticate User:
import { ZoomService, AuthCallbackResponse } from 'ng-ft-zoom-sdk';
....
constructor(
protected zoom: ZoomService
){}
authenticateUser() {
this.zoom.authenticate("user_id", "user_encrypted_secret").then((res: AuthCallbackResponse) => {
console.log(res.successful ? 'User enrolled' : 'Failed to enroll user.');
}).catch(err => console.log(err));
}
Check user enrollment:
import { ZoomService } from 'ng-ft-zoom-sdk';
....
constructor(
protected zoom: ZoomService
){}
isUserEnrolled() {
this.zoom.isUserEnrolled("user_id").then((status: boolean) => console.log(status)).catch(err => console.log(err));
}
Get SDK Status:
import { ZoomService } from 'ng-ft-zoom-sdk';
....
constructor(
protected zoom: ZoomService
){}
getSdkStatus() {
this.zoom.getSdkStatus().then((status: string) => console.log(status)).catch(err => console.log(err));
}
Get SDK version:
import { ZoomService } from 'ng-ft-zoom-sdk';
....
constructor(
protected zoom: ZoomService
){}
getVersion() {
this.zoom.getVersion().then((version: string) => console.log(version)).catch(err => console.log(err));
}