package Ġcom . hero es . service _ locator Ċ Ċ import Ġcom . hero es . data . source . remote . api . Hero es Api Ċ import Ġcom . hero es . data . source . remote . api . Hero es Details Api Ċ import Ġcom . hero es . utils . constants . Network Constants Ċ import Ġcom . har old admin . cn rad apter . Network Response Adapter Factory Ċ import Ġokhttp 3 . Ok HttpClient Ċ import Ġokhttp 3 . logging . Http Logging Interceptor Ċ import Ġorg . k oin . dsl . module Ċ import Ġretrofit 2 . Ret rofit Ċ import Ġretrofit 2 . converter . gson . Gson Converter Factory Ċ Ċ val Ġnetwork Module Ġ= Ġmodule Ġ{ ĊĠĠĠ Ġsingle Ġ{ Ġprovide Ret rofit () Ġ} ĊĠĠĠ Ġsingle Ġ{ Ġprovide Hero es Api ( get ()) Ġ} ĊĠĠĠ Ġsingle Ġ{ Ġprovide Hero es Details Api ( get ()) Ġ} Ċ } Ċ Ċ private Ġfun Ġprovide Ret rofit () Ġ= ĊĠĠĠ ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠ Ġ. baseUrl ( Network Constants . BASE _ URL ) ĊĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ()) ĊĠĠĠĠĠĠĠ Ġ. add Call Adapter Factory ( Network Response Adapter Factory ()) ĊĠĠĠĠĠĠĠ Ġ. client ( provide Ok HttpClient ()) ĊĠĠĠĠĠĠĠ Ġ. build () Ċ Ċ private Ġfun Ġprovide Hero es Api ( ret rofit : ĠRet rofit ): ĠHero es Api Ġ= Ġretrofit . create ( Hero es Api :: class . java ) Ċ private Ġfun Ġprovide Hero es Details Api ( ret rofit : ĠRet rofit ): ĠHero es Details Api Ġ= Ġretrofit . create ( Hero es Details Api :: class . java ) Ċ Ċ private Ġfun Ġprovide Ok HttpClient (): ĠOk HttpClient Ġ{ ĊĠĠĠ Ġreturn ĠOk HttpClient (). newBuilder (). add Interceptor ( Http Logging Interceptor (). apply Ġ{ ĊĠĠĠĠĠĠĠ Ġset Level ( Http Logging Interceptor . Level . BODY ) ĊĠĠĠ Ġ}). build () Ċ }