-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use this repository interface from use cases, instead of calling the services directly.
- Loading branch information
Showing
20 changed files
with
287 additions
and
156 deletions.
There are no files selected for viewing
25 changes: 0 additions & 25 deletions
25
slackhealthbot/domain/modelmappers/remoteservicetodomain/activity.py
This file was deleted.
Oops, something went wrong.
38 changes: 0 additions & 38 deletions
38
slackhealthbot/domain/modelmappers/remoteservicetodomain/sleep.py
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
slackhealthbot/domain/remoterepository/remotefitbitrepository.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import datetime | ||
from abc import ABC | ||
|
||
from slackhealthbot.core.models import OAuthFields | ||
from slackhealthbot.domain.models.activity import ActivityData | ||
from slackhealthbot.domain.models.sleep import SleepData | ||
|
||
|
||
class RemoteFitbitRepository(ABC): | ||
async def subscribe( | ||
self, | ||
oauth_fields: OAuthFields, | ||
): | ||
pass | ||
|
||
async def get_activity( | ||
self, oauth_fields: OAuthFields, when: datetime.datetime | ||
) -> tuple[str, ActivityData] | None: | ||
pass | ||
|
||
async def get_sleep( | ||
self, | ||
oauth_fields: OAuthFields, | ||
when: datetime.date, | ||
) -> SleepData | None: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.