mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-17 22:15:11 +08:00
docs(flurry-analytics): fix jsdoc
This commit is contained in:
parent
bee3d639cb
commit
237ea0d90d
@ -1,5 +1,10 @@
|
|||||||
import { Plugin, CordovaInstance, checkAvailability, IonicNativePlugin } from '@ionic-native/core';
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
import {
|
||||||
|
checkAvailability,
|
||||||
|
CordovaInstance,
|
||||||
|
IonicNativePlugin,
|
||||||
|
Plugin
|
||||||
|
} from '@ionic-native/core';
|
||||||
|
|
||||||
export interface FlurryAnalyticsOptions {
|
export interface FlurryAnalyticsOptions {
|
||||||
/** Flurry API key is required */
|
/** Flurry API key is required */
|
||||||
@ -73,16 +78,15 @@ export interface FlurryAnalyticsLocation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
export class FlurryAnalyticsObject {
|
export class FlurryAnalyticsObject {
|
||||||
|
constructor(private _objectInstance: any) {}
|
||||||
constructor(private _objectInstance: any) { }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function set the Event
|
* This function set the Event
|
||||||
* @param eventName {string} Name of the event
|
* @param {string} eventName Name of the event
|
||||||
* @param [params] {Object} Optional params
|
* @param {Object} [params] Optional params
|
||||||
* @return {Promise<any>} Returns a promise that resolves when event is sent
|
* @return {Promise<any>} Returns a promise that resolves when event is sent
|
||||||
*/
|
*/
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
@ -95,8 +99,8 @@ export class FlurryAnalyticsObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a timed event
|
* Start a timed event
|
||||||
* @param eventName {string} Name of the event
|
* @param {string} eventName Name of the event
|
||||||
* @param [params] {Object} Optional params
|
* @param {Object} Optional params
|
||||||
* @return {Promise<any>} Returns a promise that resolves when timed event is started tracking
|
* @return {Promise<any>} Returns a promise that resolves when timed event is started tracking
|
||||||
*/
|
*/
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
@ -109,8 +113,8 @@ export class FlurryAnalyticsObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Complete a timed event
|
* Complete a timed event
|
||||||
* @param eventName {string} Name of the event
|
* @param {string} eventName Name of the event
|
||||||
* @param [params] {Object} Optional params
|
* @param {Object} [params] Optional params
|
||||||
* @return {Promise<any>} Returns a promise that resolves when timed event is ended tracking
|
* @return {Promise<any>} Returns a promise that resolves when timed event is ended tracking
|
||||||
*/
|
*/
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
@ -123,8 +127,8 @@ export class FlurryAnalyticsObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function log an error
|
* This function log an error
|
||||||
* @param code
|
* @param {Object} code
|
||||||
* @param message
|
* @param {Object} message
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
@ -144,12 +148,15 @@ export class FlurryAnalyticsObject {
|
|||||||
/**
|
/**
|
||||||
* This function set the location for the event
|
* This function set the location for the event
|
||||||
* (this is will only be used for very course grained statistics like city)
|
* (this is will only be used for very course grained statistics like city)
|
||||||
* @param location {FlurryAnalyticsLocation}
|
* @param {FlurryAnalyticsLocation} location
|
||||||
* @param message {string}
|
* @param {string} message
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
setLocation(location: FlurryAnalyticsLocation, message: string): Promise<any> {
|
setLocation(
|
||||||
|
location: FlurryAnalyticsLocation,
|
||||||
|
message: string
|
||||||
|
): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,7 +179,6 @@ export class FlurryAnalyticsObject {
|
|||||||
endSession(): Promise<any> {
|
endSession(): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -216,22 +222,24 @@ export class FlurryAnalyticsObject {
|
|||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class FlurryAnalytics extends IonicNativePlugin {
|
export class FlurryAnalytics extends IonicNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance of FlurryAnalyticsObject
|
* Creates a new instance of FlurryAnalyticsObject
|
||||||
* @param options {FlurryAnalyticsOptions} options
|
* @param {FlurryAnalyticsOptions} options Options
|
||||||
* @return {FlurryAnalyticsObject}
|
* @return {FlurryAnalyticsObject}
|
||||||
*/
|
*/
|
||||||
create(options: FlurryAnalyticsOptions): FlurryAnalyticsObject {
|
create(options: FlurryAnalyticsOptions): FlurryAnalyticsObject {
|
||||||
|
|
||||||
let instance: any;
|
let instance: any;
|
||||||
|
|
||||||
if (checkAvailability(FlurryAnalytics.pluginRef, null, FlurryAnalytics.pluginName) === true) {
|
if (
|
||||||
|
checkAvailability(
|
||||||
|
FlurryAnalytics.pluginRef,
|
||||||
|
null,
|
||||||
|
FlurryAnalytics.pluginName
|
||||||
|
) === true
|
||||||
|
) {
|
||||||
instance = new (window as any).FlurryAnalytics(options);
|
instance = new (window as any).FlurryAnalytics(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new FlurryAnalyticsObject(instance);
|
return new FlurryAnalyticsObject(instance);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user