diff --git a/README.md b/README.md index 5dc4c2a9d228d7b9f3a0d2aefdc72d26c3f10bbf..bc79682adf5ee3e1cf4f2292938a3dee7f1cbd9b 100644 --- a/README.md +++ b/README.md @@ -306,6 +306,29 @@ AppleHealthKit.getLatestWeight(null, (err: string, weight: number) => { ___ +#### **`getWeightSamples`** +query for weight samples. the options object is used to setup a query to retrieve relevant samples. +```javascript +let options = { + unit: 'pound', // optional; default 'pound' + startDate: (new Date(2016,4,27)).toISOString(), // required + endDate: (new Date()).toISOString(), // optional; default now + ascending: false, // optional; default false + limit:10, // optional; default no limit +}; +``` + +```javascript +AppleHealthKit.getWeightSamples(options, (err: Object, samples: Array) => { + if(this._handleHealthKitError(err, 'getWeightSamples')){ + return; + } + // use samples ... +}); +``` + +___ + #### **`saveWeight`** save a numeric weight value to HealthKit