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
identifierThe Polar device ID or BT address.
fromDateThe starting date of the period to retrieve steps from.
toDateThe ending date of the period to retrieve steps from.
Return Value
A Single emitting an array of
PolarStepsDatarepresenting 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
identifierThe Polar device ID or BT address.
fromDateThe starting date of the period to retrieve distance from.
toDateThe ending date of the period to retrieve distance from.
Return Value
A Single emitting an array of
PolarDistanceDatarepresenting 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
identifierThe Polar device ID or BT address.
fromDateThe starting date of the period to retrieve active time from.
toDateThe ending date of the period to retrieve active time from.
Return Value
A Single emitting an array of
PolarActiveTimeDatarepresenting 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
identifierThe Polar device ID or BT address.
fromDateThe starting date of the period to retrieve calories from.
toDateThe ending date of the period to retrieve calories from.
Return Value
A Single emitting an array of
PolarCaloriesDatarepresenting 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
identifierThe Polar device ID or BT address.
fromDateThe starting date of the period to retrieve heart rate samples from.
toDateThe ending date of the period to retrieve heart rate samples from.
Return Value
A Single emitting an array of
PolarActiveTimeDatarepresenting 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
identifierThe Polar device ID or BT address.
fromDateThe starting date of the period to retrieve nightly recharge from.
toDateThe ending date of the period to retrieve nightly recharge from.
Return Value
A Single emitting an array of
PolarNightlyRechargeDatarepresenting 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
identifierThe Polar device ID or BT address.
fromDateThe starting date of the period to retrive skin temperature from.
toDateThe ending date of the period to retrieve skin temperature from.
Return Value
A Single emitting an array of
PolarSkinTemperatureResultrepresenting the skin temperature 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
identifierPolar device ID or BT address
fromDateThe starting date of the period to retrieve 24/7 PPi data from
toDateThe 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.
-
Load activity sample data from a device for a given period.
Declaration
Swift
func getActivitySampleData(identifier: String, fromDate: Date, toDate: Date) -> Single<[PolarActivityDayData]>Parameters
identifierPolar device ID or BT address
fromDateThe starting date of the period to retrieve activity sample data from
toDateThe ending date of the period to retrieve activity sample data from
Return Value
A [Single] emitting a list of [PolarActivityDayData] representing the activity sample data for the specified period.
-
Load daily summary data from a device for a given period. Daily summary is a cumulative sum for activity per given date.
Declaration
Swift
func getDailySummaryData(identifier: String, fromDate: Date, toDate: Date) -> Single<[PolarDailySummary]>Parameters
identifierPolar device ID or BT address
fromDateThe starting date of the period to retrieve daily summary data from
toDateThe ending date of the period to retrieve daily summary data from
Return Value
A [Single] emitting a list of [PolarDailySummary] representing the daily summary data for the specified period.