-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added retrofit dependencies, created quotable API DI, created retrofi…
…t DI, Created Statistics viewmodel, finished Statistics view
- Loading branch information
1 parent
9fb53f6
commit a7f6d5e
Showing
15 changed files
with
270 additions
and
21 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
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
9 changes: 9 additions & 0 deletions
9
app/src/main/java/ramzi/eljabali/justjog/motivationalquotes/MotivationQuotesAPI.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 ramzi.eljabali.justjog.motivationalquotes | ||
|
||
import retrofit2.Response | ||
import retrofit2.http.GET | ||
|
||
interface MotivationQuotesAPI { | ||
@GET("/quotes/random?minLength=100&maxLength=140&tags=Motivational/") | ||
suspend fun getQuote(): Response<Array<MotivationalQuote>> | ||
} |
22 changes: 22 additions & 0 deletions
22
app/src/main/java/ramzi/eljabali/justjog/motivationalquotes/MotivationalQuote.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,22 @@ | ||
package ramzi.eljabali.justjog.motivationalquotes | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class MotivationalQuote( | ||
@SerializedName("_id") | ||
val id: String, | ||
@SerializedName("content") | ||
val quote: String, | ||
@SerializedName("author") | ||
val author: String, | ||
@SerializedName("tags") | ||
val tags: Array<String>, | ||
@SerializedName("authorSlug") | ||
val authorSlug: String, | ||
@SerializedName("length") | ||
val length: Int, | ||
@SerializedName("dateAdded") | ||
val dateAdded: String, | ||
@SerializedName("dateModified") | ||
val dateModified: String | ||
) |
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
7 changes: 0 additions & 7 deletions
7
app/src/main/java/ramzi/eljabali/justjog/viewmodel/JogViewModel.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.