-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Year in review - #TräwellingWrapped (#451)
- Loading branch information
Showing
15 changed files
with
1,170 additions
and
6 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
61 changes: 61 additions & 0 deletions
61
app/src/main/kotlin/de/hbch/traewelling/api/models/wrapped/YearInReview.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,61 @@ | ||
package de.hbch.traewelling.api.models.wrapped | ||
|
||
import com.google.gson.annotations.SerializedName | ||
import de.hbch.traewelling.api.models.station.Station | ||
import de.hbch.traewelling.api.models.status.Status | ||
import de.hbch.traewelling.api.models.user.LightUser | ||
|
||
data class YearInReviewData( | ||
val user: LightUser, | ||
val count: Int, | ||
val distance: YearInReviewSumStats, | ||
val duration: YearInReviewSumStats, | ||
val totalDelay: Int, | ||
val operators: TopBy, | ||
val lines: TopBy, | ||
val longestTrips: LongestTrips, | ||
@SerializedName("fastestTrips") val fastestTrip: Status, | ||
@SerializedName("slowestTrips") val slowestTrip: Status, | ||
@SerializedName("mostDelayedArrivals") val mostDelayedArrival: Status, | ||
val topDestinations: List<TopStation>, | ||
val lonelyStations: List<TopStation>, | ||
val mostLikedStatuses: List<MostLikedStatus> | ||
) | ||
|
||
data class YearInReviewSumStats( | ||
val total: Long, | ||
val averagePerDay: Float | ||
) | ||
|
||
data class TopByDistance( | ||
val operator: String, | ||
val distance: Long, | ||
val line: String? | ||
) | ||
|
||
data class TopByDuration( | ||
val operator: String, | ||
val duration: Long, | ||
val line: String? | ||
) | ||
|
||
data class TopBy( | ||
val count: Int?, | ||
val topByDistance: TopByDistance, | ||
val topByDuration: TopByDuration | ||
) | ||
|
||
data class LongestTrips( | ||
val distance: Status, | ||
val duration: Status | ||
) | ||
|
||
data class TopStation( | ||
val count: Int, | ||
val station: Station | ||
) | ||
|
||
data class MostLikedStatus( | ||
val likeCount: Int, | ||
val status: Status | ||
) |
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.