package Ġcom . example . poly care er . data . repository Ċ Ċ import Ġcom . example . poly care er . data . api . ApiService Ċ import Ġcom . example . poly care er . domain . model . Questions ApiResponse Ċ import Ġcom . example . poly care er . exception . Lost Connection Exception Ċ import Ġcom . example . poly care er . exception . Wrong Response Exception Ċ import Ġretrofit 2 . Ret rofit Ċ Ċ class ĠQu iz Items Remote Repository ( ĊĠĠĠ Ġprivate Ġval Ġretrofit : ĠRet rofit Ċ ) Ġ{ ĊĠĠĠ Ġfun Ġget Questions (): ĠQuestions ApiResponse Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġresponse Ġ= Ġget Response () ĊĊĠĠĠĠĠĠĠ Ġif Ġ( response . is Successful ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġresponse . body () !! ĊĠĠĠĠĠĠĠ Ġ} Ġelse Ġthrow ĠWrong Response Exception ( response . message ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġget Response () Ġ= Ġtry Ġ{ ĊĠĠĠĠĠĠĠ Ġretrofit . create ( ApiService :: class . java ). get Questions List (). execute () ĊĠĠĠ Ġ} Ġcatch Ġ( e : ĠException ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthrow ĠL ost Connection Exception () ĊĠĠĠ Ġ} Ċ }