1.0.0 • Published 8 months ago

capacitor-healthkit-weight-plugin v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

capacitor-healthkit-weight

Plugin to get and set Apple Healthkit weight data. Created to be used on a private project.

You are welcome to use this package, and I will keep updated when I have the time.

PRs will be considered, but I am unlikely to respond to issues on this repo.

Install

npm install capacitor-healthkit-weight
npx cap sync

API

requestAuthorization(...)

requestAuthorization(options: RequestAuthorizationOptions) => Promise<void>
ParamType
optionsRequestAuthorizationOptions

isAvailable()

isAvailable() => Promise<void>

getAuthorizationStatus(...)

getAuthorizationStatus(options: GetAuthorizationStatusOptions) => Promise<{ status: AuthorizationStatus; }>
ParamType
optionsGetAuthorizationStatusOptions

Returns: Promise<{ status: AuthorizationStatus; }>


getBodyMassEntries(...)

getBodyMassEntries(options: BodyMassQueryOptions) => Promise<BodyMassQueryOutput>
ParamType
optionsBodyMassQueryOptions

Returns: Promise<BodyMassQueryOutput>


setBodyMassEntry(...)

setBodyMassEntry(options: { value: number; date: string; }) => Promise<void>
ParamType
options{ value: number; date: string; }

getUserIdentifier()

getUserIdentifier() => Promise<{ value: string; }>

Returns: Promise<{ value: string; }>


Interfaces

RequestAuthorizationOptions

PropType
allstring[]
readstring[]
writestring[]

GetAuthorizationStatusOptions

PropType
sampleTypestring

BodyMassQueryOutput

PropType
data{ date: string; value: number; unit: string; uuid: string; sourceName: string; sourceBundleId: string; }[]

BodyMassQueryOptions

PropType
startDatestring
endDatestring
limitnumber

Type Aliases

AuthorizationStatus

'notDetermined' | 'sharingDenied' | 'sharingAuthorized'

1.0.0

8 months ago

0.0.14

9 months ago

0.0.13

10 months ago

0.0.12

10 months ago

0.0.11

10 months ago

0.0.10

10 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

11 months ago