@@ -3,7 +3,7 @@ package org.codeoverflow.chatoverflow.requirement.service.twitch.api.impl
33import akka .actor .{ActorRef , ActorSystem , Props }
44import akka .pattern .ask
55import akka .util .Timeout
6- import org .codeoverflow .chatoverflow .api .io .dto .User
6+ import org .codeoverflow .chatoverflow .api .io .dto .stat . twitch . TwitchUserStats
77import org .codeoverflow .chatoverflow .api .io .input .stat .TwitchStatInput
88import org .codeoverflow .chatoverflow .framework .actors .{Mapping , StringMappingActor }
99import org .codeoverflow .chatoverflow .registry .Impl
@@ -23,7 +23,7 @@ class TwitchStatInputImpl extends InputImpl[TwitchAPIConnector] with TwitchStatI
2323 private val actor : ActorRef = actorSystem.actorOf(Props [StringMappingActor ])
2424 implicit val timeout : Timeout = Timeout (5 seconds)
2525
26- override def getFollowers (userName : String ): java.util.List [User ] = {
26+ override def getFollowers (userName : String ): java.util.List [TwitchUserStats ] = {
2727 val userID = getUser(userName).getId
2828 val response = sourceConnector.get.getFollowers(userID)
2929 println(response)
@@ -35,13 +35,13 @@ class TwitchStatInputImpl extends InputImpl[TwitchAPIConnector] with TwitchStatI
3535 sourceConnector.get.getSubscriptions(userID)
3636 }
3737
38- override def getUser (userName : String ): User = {
38+ override def getUser (userName : String ): TwitchUserStats = {
3939 val response = sourceConnector.get.getUser(userName)
4040 println(response)
4141 val result = Await .result(actor ? Mapping (map[UserResult ], response), timeout.duration).asInstanceOf [UserResult ]
4242 if (result.data.nonEmpty) {
4343 val user = result.data.head
44- new User (user.id, user.display_name, user.description, user.profile_image_url, user.view_count)
44+ new TwitchUserStats (user.id, user.display_name, user.description, user.profile_image_url, user.view_count)
4545 }
4646 else null
4747 }
0 commit comments