package Ġl uy ao . wan android . compose . model . repository Ċ Ċ import Ġl uy ao . wan android . compose . model . api . Base Repository Ċ import Ġl uy ao . wan android . compose . model . api . Wan Ret rofit Client Ċ import Ġl uy ao . wan android . compose . model . bean . Article List Ċ import Ġl uy ao . wan android . compose . model . bean . Banner Ċ import Ġl uy ao . wan android . compose . model . bean . Result Ċ import Ġl uy ao . wan android . compose . util . execute Response Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġl uy ao Ċ Ġ* Ġon Ġ 2 0 1 9 / 4 / 1 0 Ġ 1 4 : 0 9 Ċ Ġ*/ Ċ class ĠHome Repository Ġ: ĠBase Repository () Ġ{ ĊĊĠĠĠ Ġsuspend Ġfun Ġget B anners (): ĠResult < List < Banner >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġsafe Api Call ( call Ġ= Ġ{ request B anners ()}, errorMessage Ġ= Ġ"") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġsuspend Ġfun Ġrequest B anners (): ĠResult < List < Banner >> Ġ= ĊĠĠĠĠĠĠĠ Ġexecute Response ( Wan Ret rofit Client . service . get Banner ()) ĊĊĊĠĠĠ Ġsuspend Ġfun Ġget Article List ( page : ĠInt ): ĠResult < Article List > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġsafe Api Call ( call Ġ= Ġ{ Ġrequest Article List ( page ) Ġ}, ĠerrorMessage Ġ= Ġ" ç½ĳç»ľ éĶĻè¯¯ ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġsuspend Ġfun Ġrequest Article List ( page : ĠInt ): ĠResult < Article List > Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġexecute Response ( Wan Ret rofit Client . service . get Home Articles ( page ). execute ()) Ċ }