Skip to content

An experiment to see if the HealthKit querying api can be simplified into something that resembles Alamofire

License

Notifications You must be signed in to change notification settings

wilmarvh/Gladstone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gladstone

An experiment to see if the HealthKit querying api can be simplified into something that resembles Alamofire

Gladstone.latest(.activeEnergyBurned).results({ sample in
    debugPrint("Latest sample for active energy burned: \(sample as Any)")
})

Gladstone.query(for: .heartRate)
    .sorted(withSortDescriptors: [NSSortDescriptor.init(key: HKSampleSortIdentifierStartDate, ascending: false)])
    .limited(numberOfSamples: 10)
    .excludeSource(withBundleIdentifier: "com.apple")
    .results { results in
        debugPrint(results as Any)
}

About

An experiment to see if the HealthKit querying api can be simplified into something that resembles Alamofire

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published