Skip to main content

Rook Api Sources

To have a better separation of data sources (and with the addition of the Samsung Health SDK), we decided to move the RookDataSources class and all it's functions to RookApiSources available within the new SDK: rook-api-sources

This component is completely separated from Health Connect and Samsung Health SDKs so you'll need to initialize it with your credentials and provide the userID with each usage.

Migration process

The following classes have been removed:

  • DataSource
  • AuthorizedDataSources

The following classes have been moved to the package io.tryrook.api.sources.domain.model.*

  • DataSourceAuthorizer
  • AuthorizedDataSourceV2

The following classes have been moved to the package io.tryrook.api.sources.domain.enums.*

  • DataSourceType

The following functions have been replaced by the new RookApiSources class.

Deprecated (RookDataSources - Instance)Replacement (RookApiSources - Instance)
revokeDataSource(String)revokeDataSource(String, DataSourceType)
revokeDataSource(DataSourceType)revokeDataSource(String, DataSourceType)
getAuthorizedDataSourcesV2()getAuthorizedDataSourcesV2(String)
getAuthorizedDataSources()getAuthorizedDataSourcesV2(String)
getDataSourceAuthorizer(String, String?)getDataSourceAuthorizer(String, String, String)
getAvailableDataSources(String?)getAuthorizedDataSourcesV2(String)
Deprecated (RookDataSources - Companion)Replacement (RookApiSources - Instance)
revokeDataSource(Context, String)revokeDataSource(String, DataSourceType)
revokeDataSource(Context, DataSourceType)revokeDataSource(String, DataSourceType)
getAuthorizedDataSourcesV2(Context)getAuthorizedDataSourcesV2(String)
getAuthorizedDataSources(Context)getAuthorizedDataSourcesV2(String)
getDataSourceAuthorizer(Context, String, String?)getDataSourceAuthorizer(String, String, String)
getAvailableDataSources(Context, String?)getAuthorizedDataSourcesV2(String)