PolarActivityApi
public protocol PolarActivityApi
Protocol defining methods to get steps for a given period.
-
Get steps for a given period.
Declaration
Swift
func getSteps(identifier: String, fromDate: Date, toDate: Date) -> Single<[PolarStepsData]>
Parameters
identifier
The Polar device ID or BT address.
fromDate
The starting date of the period to retrieve steps from.
toDate
The ending date of the period to retrieve steps from.
Return Value
A Single emitting an array of
PolarStepsData
representing the steps data for the specified period. -
Get distance for a given period.
Declaration
Swift
func getDistance(identifier: String, fromDate: Date, toDate: Date) -> Single<[PolarDistanceData]>
Parameters
identifier
The Polar device ID or BT address.
fromDate
The starting date of the period to retrieve distance from.
toDate
The ending date of the period to retrieve distance from.
Return Value
A Single emitting an array of
PolarDistanceData
representing the distance data for the specified period. -
Get active time for a given period.
Declaration
Swift
func getActiveTime(identifier: String, fromDate: Date, toDate: Date) -> Single<[PolarActiveTimeData]>
Parameters
identifier
The Polar device ID or BT address.
fromDate
The starting date of the period to retrieve active time from.
toDate
The ending date of the period to retrieve active time from.
Return Value
A Single emitting an array of
PolarActiveTimeData
representing the active time data for the specified period. -
Get calories for a given period.
Declaration
Swift
func getCalories(identifier: String, fromDate: Date, toDate: Date, caloriesType: CaloriesType) -> Single<[PolarCaloriesData]>
Parameters
identifier
The Polar device ID or BT address.
fromDate
The starting date of the period to retrieve calories from.
toDate
The ending date of the period to retrieve calories from.
Return Value
A Single emitting an array of
PolarCaloriesData
representing the calories data for the specified period. -
Get 24/7 heart rate samples for a given period.
Declaration
Swift
func get247HrSamples(identifier: String, fromDate: Date, toDate: Date) -> Single<[Polar247HrSamplesData]>
Parameters
identifier
The Polar device ID or BT address.
fromDate
The starting date of the period to retrieve heart rate samples from.
toDate
The ending date of the period to retrieve heart rate samples from.
Return Value
A Single emitting an array of
PolarActiveTimeData
representing the heart rate samples data for the specified period. -
Get nightly recharge for a given period.
Declaration
Swift
func getNightlyRecharge(identifier: String, fromDate: Date, toDate: Date) -> Single<[PolarNightlyRechargeData]>
Parameters
identifier
The Polar device ID or BT address.
fromDate
The starting date of the period to retrieve nightly recharge from.
toDate
The ending date of the period to retrieve nightly recharge from.
Return Value
A Single emitting an array of
PolarNightlyRechargeData
representing the nightly recharge data for the specified period. -
Get skin temperature for a given period.
Declaration
Swift
func getSkinTemperature(identifier: String, fromDate: Date, toDate: Date) -> Single<[PolarSkinTemperatureData.PolarSkinTemperatureResult]>
Parameters
identifier
The Polar device ID or BT address.
fromDate
The starting date of the period to retrive skin temperature from.
toDate
The ending date of the period to retrieve skin temperature from.
Return Value
A Single emitting an array of
PolarNightlyRechargeData
representing the nightly recharge data for the specified period. -
Load 24/7 PPi data from a device for a given period.
Declaration
Swift
func get247PPiSamples(identifier: String, fromDate: Date, toDate: Date) -> Single<[Polar247PPiSamplesData]>
Parameters
identifier
Polar device ID or BT address
fromDate
The starting date of the period to retrieve 24/7 PPi data from
toDate
The ending date of the period to retrieve 24/7 PPi data from
Return Value
A [Single] emitting a list of [Polar247PPiSamplesData] representing the 24/7 PPi data for the specified period.