package Ġcom . tom mas ober lose . another widget . network . repository Ċ Ċ import Ġcom . har old admin . cn rad apter . Network Response Adapter Factory Ċ import Ġcom . tom mas ober lose . another widget . global . Preferences Ċ import Ġcom . tom mas ober lose . another widget . network . api . Api Services Ċ import Ġretrofit 2 . Ret rofit Ċ import Ġretrofit 2 . converter . gson . Gson Converter Factory Ċ Ċ class ĠWeather bit Repository Ġ{ ĊĊĠĠĠ Ġ/* ĠBIT Ġ*/ ĊĠĠĠ Ġprivate Ġval Ġapi Service Bit : ĠApi Services . Weather Bit Service Ġ= Ġget Ret rofit (). create ( Api Services . Weather Bit Service :: class . java ) ĊĠĠĠ Ġsuspend Ġfun Ġget Weather () Ġ= Ġapi Service Bit . get Weather ( Preferences . weather Provider Api Weather Bit , ĠPreferences . custom Location Lat , ĠPreferences . custom Location Lon , Ġif Ġ( Preferences . weather Temp Unit Ġ== Ġ" F ") Ġ" I " Ġelse Ġ" M ") ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠBASE _ URL _ BIT Ġ= Ġ" https :// api . weather bit . io / v 2 . 0 /" ĊĊĠĠĠĠĠĠĠ Ġprivate Ġfun Ġget Ret rofit (): ĠRet rofit Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl ( BASE _ URL _ BIT ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Call Adapter Factory ( Network Response Adapter Factory ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }