mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(healt): add correct return type for query function (#2565)
* update query return type query is always returning an array * refactor
This commit is contained in:
parent
8d571989d4
commit
98d44e6294
@ -241,7 +241,7 @@ export class Health extends IonicNativePlugin {
|
||||
* been given at some point in the past.
|
||||
*
|
||||
* Quirks of requestAuthorization()
|
||||
|
||||
*
|
||||
* In Android, it will try to get authorization from the Google Fit APIs.
|
||||
* It is necessary that the app's package name and the signing key are registered in the Google API console.
|
||||
* In Android, be aware that if the activity is destroyed (e.g. after a rotation) or is put in background,
|
||||
@ -298,11 +298,11 @@ export class Health extends IonicNativePlugin {
|
||||
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
|
||||
* Automatic conversion is not trivial and depends on the actual substance.
|
||||
*
|
||||
* @param queryOptions {HealthQueryOptions}
|
||||
* @return {Promise<HealthData>}
|
||||
* @param {HealthQueryOptions} queryOptions
|
||||
* @return {Promise<HealthData[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
query(queryOptions: HealthQueryOptions): Promise<HealthData> { return; }
|
||||
query(queryOptions: HealthQueryOptions): Promise<HealthData[]> { return; }
|
||||
|
||||
/**
|
||||
* Gets aggregated data in a certain time window. Usually the sum is returned for the given quantity.
|
||||
@ -322,7 +322,7 @@ export class Health extends IonicNativePlugin {
|
||||
* To be sure to get all the stored quantities, it's better to query single nutrients.
|
||||
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
|
||||
*
|
||||
* @param queryOptionsAggregated {HealthQueryOptionsAggregated}
|
||||
* @param {HealthQueryOptionsAggregated} queryOptionsAggregated
|
||||
* @return {Promise<HealthData[]>}
|
||||
*/
|
||||
@Cordova()
|
||||
|
Loading…
Reference in New Issue
Block a user