1.0.0 • Published 1 year ago

capacitor-healthkit-weight-plugin v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

2 years ago