mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +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 {
|
||||
checkAvailability,
|
||||
CordovaInstance,
|
||||
IonicNativePlugin,
|
||||
Plugin
|
||||
} from '@ionic-native/core';
|
||||
|
||||
export interface FlurryAnalyticsOptions {
|
||||
/** Flurry API key is required */
|
||||
@ -73,16 +78,15 @@ export interface FlurryAnalyticsLocation {
|
||||
}
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
* @hidden
|
||||
*/
|
||||
export class FlurryAnalyticsObject {
|
||||
|
||||
constructor(private _objectInstance: any) { }
|
||||
constructor(private _objectInstance: any) {}
|
||||
|
||||
/**
|
||||
* This function set the Event
|
||||
* @param eventName {string} Name of the event
|
||||
* @param [params] {Object} Optional params
|
||||
* @param {string} eventName Name of the event
|
||||
* @param {Object} [params] Optional params
|
||||
* @return {Promise<any>} Returns a promise that resolves when event is sent
|
||||
*/
|
||||
@CordovaInstance({
|
||||
@ -95,8 +99,8 @@ export class FlurryAnalyticsObject {
|
||||
|
||||
/**
|
||||
* Start a timed event
|
||||
* @param eventName {string} Name of the event
|
||||
* @param [params] {Object} Optional params
|
||||
* @param {string} eventName Name of the event
|
||||
* @param {Object} Optional params
|
||||
* @return {Promise<any>} Returns a promise that resolves when timed event is started tracking
|
||||
*/
|
||||
@CordovaInstance({
|
||||
@ -109,8 +113,8 @@ export class FlurryAnalyticsObject {
|
||||
|
||||
/**
|
||||
* Complete a timed event
|
||||
* @param eventName {string} Name of the event
|
||||
* @param [params] {Object} Optional params
|
||||
* @param {string} eventName Name of the event
|
||||
* @param {Object} [params] Optional params
|
||||
* @return {Promise<any>} Returns a promise that resolves when timed event is ended tracking
|
||||
*/
|
||||
@CordovaInstance({
|
||||
@ -123,8 +127,8 @@ export class FlurryAnalyticsObject {
|
||||
|
||||
/**
|
||||
* This function log an error
|
||||
* @param code
|
||||
* @param message
|
||||
* @param {Object} code
|
||||
* @param {Object} message
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance()
|
||||
@ -144,12 +148,15 @@ export class FlurryAnalyticsObject {
|
||||
/**
|
||||
* This function set the location for the event
|
||||
* (this is will only be used for very course grained statistics like city)
|
||||
* @param location {FlurryAnalyticsLocation}
|
||||
* @param message {string}
|
||||
* @param {FlurryAnalyticsLocation} location
|
||||
* @param {string} message
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@CordovaInstance()
|
||||
setLocation(location: FlurryAnalyticsLocation, message: string): Promise<any> {
|
||||
setLocation(
|
||||
location: FlurryAnalyticsLocation,
|
||||
message: string
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -172,7 +179,6 @@ export class FlurryAnalyticsObject {
|
||||
endSession(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -216,22 +222,24 @@ export class FlurryAnalyticsObject {
|
||||
})
|
||||
@Injectable()
|
||||
export class FlurryAnalytics extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* Creates a new instance of FlurryAnalyticsObject
|
||||
* @param options {FlurryAnalyticsOptions} options
|
||||
* @param {FlurryAnalyticsOptions} options Options
|
||||
* @return {FlurryAnalyticsObject}
|
||||
*/
|
||||
create(options: FlurryAnalyticsOptions): FlurryAnalyticsObject {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
return new FlurryAnalyticsObject(instance);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user