mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:32:52 +08:00
feat(janalytics): add plugin (#2711)
* add janalytics native plugin * add new plugin of wechat * rm plugin wechat * Update index.ts
This commit is contained in:
parent
10ac9ff9de
commit
0b9717636c
95
src/@ionic-native/plugins/janalytics/index.ts
Normal file
95
src/@ionic-native/plugins/janalytics/index.ts
Normal file
@ -0,0 +1,95 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
/**
|
||||
* @name jAnalytics
|
||||
* @description
|
||||
* This plugin does something
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { JAnalytics } from '@ionic-native/JAnalytics';
|
||||
*
|
||||
*
|
||||
* constructor(private jAnalytics: JAnalytics) { }
|
||||
*
|
||||
* ...
|
||||
*
|
||||
*
|
||||
* this.jAnalytics.functionName('Hello', 123)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'JAnalytics',
|
||||
plugin: 'cordova-plugin-janalytics',
|
||||
pluginRef: 'JAnalytics',
|
||||
repo: 'https://github.com/jpush/cordova-plugin-janalytics',
|
||||
install:
|
||||
'ionic cordova plugin add cordova-plugin-janalytics --variable APP_KEY=YOUR_APP_KEY',
|
||||
installVariables: ['APP_KEY'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class JAnalytics extends IonicNativePlugin {
|
||||
/**
|
||||
* This function does something
|
||||
* @return {Promise<any>} Returns a promise that resolves when something happens
|
||||
*/
|
||||
@Cordova()
|
||||
init(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
initCrashHandler(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
stopCrashHandler(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
onPageStart(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
onPageEnd(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addCountEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addCalculateEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addLoginEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addRegisterEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addBrowseEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@Cordova()
|
||||
addPurchaseEvent(params: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user