-
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.
- Loading branch information
1 parent
31f3493
commit 4e80992
Showing
17 changed files
with
229 additions
and
49 deletions.
There are no files selected for viewing
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
23 changes: 16 additions & 7 deletions
23
...src/main/java/com/modarb/android/ui/home/ui/plan/adapters/CustomWorkoutTemplateAdapter.kt
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
8 changes: 8 additions & 0 deletions
8
...a/com/modarb/android/ui/home/ui/plan/domain/models/customworkout/CustomWorkoutResponse.kt
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,8 @@ | ||
package com.modarb.android.ui.home.ui.plan.domain.models.customworkout | ||
|
||
data class CustomWorkoutResponse( | ||
val `data`: List<Data>, | ||
val message: String, | ||
val meta: Meta, | ||
val status: Int | ||
) |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/modarb/android/ui/home/ui/plan/domain/models/customworkout/Data.kt
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,9 @@ | ||
package com.modarb.android.ui.home.ui.plan.domain.models.customworkout | ||
|
||
data class Data( | ||
val creationDate: String, | ||
val exercises: List<Exercise>, | ||
val id: String, | ||
val name: String, | ||
val user: String | ||
) |
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/modarb/android/ui/home/ui/plan/domain/models/customworkout/Exercise.kt
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,17 @@ | ||
package com.modarb.android.ui.home.ui.plan.domain.models.customworkout | ||
|
||
data class Exercise( | ||
val __v: Int, | ||
val _id: String, | ||
val benefits: String, | ||
val category: String, | ||
val coverImage: String, | ||
val duration: Int, | ||
val equipments: List<String>, | ||
val exerciseType: String, | ||
val expectedDurationRange: ExpectedDurationRange, | ||
val instructions: String, | ||
val media: Media, | ||
val name: String, | ||
val targetMuscles: TargetMuscles | ||
) |
6 changes: 6 additions & 0 deletions
6
...a/com/modarb/android/ui/home/ui/plan/domain/models/customworkout/ExpectedDurationRange.kt
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,6 @@ | ||
package com.modarb.android.ui.home.ui.plan.domain.models.customworkout | ||
|
||
data class ExpectedDurationRange( | ||
val max: Int, | ||
val min: Int | ||
) |
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/modarb/android/ui/home/ui/plan/domain/models/customworkout/Media.kt
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,6 @@ | ||
package com.modarb.android.ui.home.ui.plan.domain.models.customworkout | ||
|
||
data class Media( | ||
val type: String, | ||
val url: String | ||
) |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/modarb/android/ui/home/ui/plan/domain/models/customworkout/Meta.kt
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,7 @@ | ||
package com.modarb.android.ui.home.ui.plan.domain.models.customworkout | ||
|
||
data class Meta( | ||
val page: Int, | ||
val perPage: Int, | ||
val total: Int | ||
) |
6 changes: 6 additions & 0 deletions
6
...main/java/com/modarb/android/ui/home/ui/plan/domain/models/customworkout/TargetMuscles.kt
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,6 @@ | ||
package com.modarb.android.ui.home.ui.plan.domain.models.customworkout | ||
|
||
data class TargetMuscles( | ||
val primary: String, | ||
val secondary: String | ||
) |
11 changes: 11 additions & 0 deletions
11
...rc/main/java/com/modarb/android/ui/home/ui/plan/domain/usecase/GetCustomWorkoutUseCase.kt
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,11 @@ | ||
package com.modarb.android.ui.home.ui.plan.domain.usecase | ||
|
||
import com.modarb.android.network.ApiResult | ||
import com.modarb.android.ui.home.ui.plan.domain.MyPlanRepository | ||
import com.modarb.android.ui.home.ui.plan.domain.models.customworkout.CustomWorkoutResponse | ||
|
||
class GetCustomWorkoutUseCase(private var planRepository: MyPlanRepository) { | ||
suspend fun invoke(token: String): ApiResult<CustomWorkoutResponse> { | ||
return planRepository.getCustomWorkouts(token) | ||
} | ||
} |
Oops, something went wrong.