@startuml ' title =**Get All Episode Actions** participant EpisodeActionController << (C, #ADD1B2) @Controller >> -> EpisodeActionController: ""GET /api/2/episodes/{username}.json"" \n//@RequestParam("device") String deviceID// \n//@RequestParam("aggregated") boolean aggregated// \n\n-> getEpisodeActions(""username"", //deviceID//, //aggregated//) note right Die Parameter //deviceID// und //aggregated// werden ignoriert, da nicht zwischen Geräten unterschieden und für jede Episode sowieso nur die letzte Play-Action gespeichert wird. Dies gilt für alle GET-Anfragen der Episode Actions API. end note activate EpisodeActionController participant EpisodeActionService << (C, #ADD1B2) @Service >> EpisodeActionController -> EpisodeActionService: getEpisodeActions(""username"") activate EpisodeActionService participant EpisodeActionDataAccessService << (C, #ADD1B2) @Repository >> EpisodeActionService -> EpisodeActionDataAccessService: getEpisodeActions(""username"") activate EpisodeActionDataAccessService EpisodeActionDataAccessService -> EpisodeActionDataAccessService: getEpisodeActionsSince(""username"", \nLocalDateTime.MIN.toEpochSecond(ZoneOffset.UTC)) database Database activate EpisodeActionDataAccessService EpisodeActionDataAccessService -> Database: get all EpisodeActions for all subscribed podcasts activate Database Database --> EpisodeActionDataAccessService: List selectedEpisodeActions \n-> then remove all older than LocalDateTime.MIN (none) EpisodeActionDataAccessService -> Database: join EpisodeActions in selectedEpisodeActions with episodeURL of Episode Database --> EpisodeActionDataAccessService deactivate Database EpisodeActionDataAccessService --> EpisodeActionDataAccessService: List episodeActionPosts deactivate EpisodeActionDataAccessService EpisodeActionDataAccessService --> EpisodeActionService: List episodeActionPosts deactivate EpisodeActionDataAccessService EpisodeActionService --> EpisodeActionController: List episodeActionPosts deactivate EpisodeActionService <-- EpisodeActionController: ResponseEntity response \n\n-> ""HTTP status code"" \n-> ""JSON"" deactivate EpisodeActionController @enduml