mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-22 01:19:36 +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.
|
* been given at some point in the past.
|
||||||
*
|
*
|
||||||
* Quirks of requestAuthorization()
|
* Quirks of requestAuthorization()
|
||||||
|
*
|
||||||
* In Android, it will try to get authorization from the Google Fit APIs.
|
* 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.
|
* 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,
|
* 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.
|
* 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.
|
* Automatic conversion is not trivial and depends on the actual substance.
|
||||||
*
|
*
|
||||||
* @param queryOptions {HealthQueryOptions}
|
* @param {HealthQueryOptions} queryOptions
|
||||||
* @return {Promise<HealthData>}
|
* @return {Promise<HealthData[]>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@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.
|
* 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.
|
* 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.
|
* nutrition.vitamin_a is given in micrograms in HealthKit and International Unit in Google Fit.
|
||||||
*
|
*
|
||||||
* @param queryOptionsAggregated {HealthQueryOptionsAggregated}
|
* @param {HealthQueryOptionsAggregated} queryOptionsAggregated
|
||||||
* @return {Promise<HealthData[]>}
|
* @return {Promise<HealthData[]>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
Loading…
Reference in New Issue
Block a user