iOS
Introduction
Asleep SDK is a software development kit that enables developers to create applications that monitor the sleep of users. The SDK provides tools and resources to integrate sleep-tracking features into mobile applications.
One of the primary features of the Asleep SDK is its ability to track the user's sleep in real time, including sleep stages and breathing stability. The SDK can gather information about the user's sleep patterns, including the amount of time spent in each stage of sleep. This information can be used to provide insights into the user's sleep quality and recommend improvements to their sleep habits.
Overall, Asleep SDK is a powerful tool for developers looking to create sleep-tracking applications. Asleep’s business partners only need to care about the UI/UX of their applications, and Asleep SDK will take care of all core functions for sleep monitoring.
With its advanced features and easy integration, it offers a comprehensive solution for developers looking to improve the sleep quality of their users.
Interfaces
2.1 Asleep.AsleepConfig
AsleepConfig
contains all essential configurations, such as API key, user ID, base URL for API communications, etc.
The config is used throughout the SDK for sleep-tracking functions.
2.2 Asleep.SleepTrackingManager
SleepTrackingManager
is used to maintain sleep sessions for a user ID specified in AsleepConfig
.
This manager can start a sleep session, stop a sleep session, as well as retrieving the latest sleep report from a user.
2.3 Asleep.Reports
Reports
manages all sleep reports of a user with a userId
specified in Asleep.Config
.
It can list all available sleep session IDs given a range of time, as well as retrieving a detailed sleep report given a session ID.
2.4 Asleep.AsleepErrorCode
This document describes all available error codes to help developers understand what is happening inside the SDK.
Updated over 1 year ago