plugin-tapdb
capacitor plugin for TapDB
Install
npm install @evol1213/capacitor-plugin-tapdb
npx cap sync
API
initialize(...)
setUser(...)
clearUser()
setName(...)
setLevel(...)
setServer(...)
onCharge(...)
trackEvent(...)
registerStaticProperties(...)
unregisterStaticProperty(...)
clearStaticProperties()
deviceUpdate(...)
deviceInitialize(...)
deviceAdd(...)
userUpdate(...)
userInitialize(...)
userAdd(...)
- Interfaces
- Type Aliases
initialize(...)
initialize(options: initOptions) => Promise<void>
初始化
Param | Type |
---|---|
options |
initOptions |
setUser(...)
setUser(options: { userId: string; }) => Promise<void>
设置账号 ID
Param | Type |
---|---|
options |
{ userId: string; } |
clearUser()
clearUser() => Promise<void>
清除账号 ID
setName(...)
setName(options: { name: string; }) => Promise<void>
设置账户名称
Param | Type |
---|---|
options |
{ name: string; } |
setLevel(...)
setLevel(options: { level: number; }) => Promise<void>
设置账户等级
Param | Type |
---|---|
options |
{ level: number; } |
setServer(...)
setServer(options: { server: string; }) => Promise<void>
设置账号区服
Param | Type |
---|---|
options |
{ server: string; } |
onCharge(...)
onCharge(options: { orderId: string; product: string; amount: number; currencyType: string; payment: string; }) => Promise<void>
上报充值
Param | Type |
---|---|
options |
{ orderId: string; product: string; amount: number; currencyType: string; payment: string; } |
trackEvent(...)
trackEvent(options: { eventName: string; properties: Object; }) => Promise<void>
上报事件
Param | Type |
---|---|
options |
{ eventName: string; properties: Object; } |
registerStaticProperties(...)
registerStaticProperties(options: { staticProperties: Object; }) => Promise<void>
设置通用事件属性
Param | Type |
---|---|
options |
{ staticProperties: Object; } |
unregisterStaticProperty(...)
unregisterStaticProperty(options: { propertyName: string; }) => Promise<void>
删除单个静态通用事件属性
Param | Type |
---|---|
options |
{ propertyName: string; } |
clearStaticProperties()
clearStaticProperties() => Promise<void>
清空全部静态通用属性
deviceUpdate(...)
deviceUpdate(options: { properties: Object; }) => Promise<void>
设备属性更新操作
Param | Type |
---|---|
options |
{ properties: Object; } |
deviceInitialize(...)
deviceInitialize(options: { properties: Object; }) => Promise<void>
设备初始化操作
Param | Type |
---|---|
options |
{ properties: Object; } |
deviceAdd(...)
deviceAdd(options: { properties: Object; }) => Promise<void>
设备属性累加操作
Param | Type |
---|---|
options |
{ properties: Object; } |
userUpdate(...)
userUpdate(options: { properties: Object; }) => Promise<void>
账号属性更新操作
Param | Type |
---|---|
options |
{ properties: Object; } |
userInitialize(...)
userInitialize(options: { properties: Object; }) => Promise<void>
账号属性初始化操作
Param | Type |
---|---|
options |
{ properties: Object; } |
userAdd(...)
userAdd(options: { properties: Object; }) => Promise<void>
账号属性累加操作
Param | Type |
---|---|
options |
{ properties: Object; } |
Interfaces
initOptions
Prop | Type |
---|---|
clientId |
string |
channel |
string |
appVersion |
string |
Object
Provides functionality common to all JavaScript objects.
Prop | Type | Description |
---|---|---|
constructor |
Function |
The initial value of Object.prototype.constructor is the standard built-in Object constructor. |
Method | Signature | Description |
---|---|---|
toString | () => string | Returns a string representation of an object. |
toLocaleString | () => string | Returns a date converted to a string using the current locale. |
valueOf | () => Object | Returns the primitive value of the specified object. |
hasOwnProperty | (v: PropertyKey) => boolean | Determines whether an object has a property with the specified name. |
isPrototypeOf | (v: Object) => boolean | Determines whether an object exists in another object's prototype chain. |
propertyIsEnumerable | (v: PropertyKey) => boolean | Determines whether a specified property is enumerable. |
Function
Creates a new function.
Prop | Type |
---|---|
prototype |
any |
length |
number |
arguments |
any |
caller |
Function |
Method | Signature | Description |
---|---|---|
apply | (this: Function, thisArg: any, argArray?: any) => any | Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function. |
call | (this: Function, thisArg: any, ...argArray: any[]) => any | Calls a method of an object, substituting another object for the current object. |
bind | (this: Function, thisArg: any, ...argArray: any[]) => any | For a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters. |
toString | () => string | Returns a string representation of a function. |
Type Aliases
PropertyKey
string | number | symbol