package Ġcom . cool weather . cool weather jet pack . data . network Ċ Ċ import Ġcom . cool weather . cool weather jet pack . data . model . place . City Ċ import Ġcom . cool weather . cool weather jet pack . data . model . place . Count y Ċ import Ġcom . cool weather . cool weather jet pack . data . model . place . Province Ċ import Ġcom . cool weather . cool weather jet pack . data . model . weather . He Weather Ċ import Ġcom . cool weather . cool weather jet pack . data . network . api . Place Service Ċ import Ġcom . cool weather . cool weather jet pack . data . network . api . Weather Service Ċ import Ġretrofit 2 . Callback Ċ Ċ class ĠCool Weather Network Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġplace Service Ġ= ĠService Creator . create ( Place Service :: class . java ) ĊĊĠĠĠ Ġprivate Ġval Ġweather Service Ġ= ĠService Creator . create ( Weather Service :: class . java ) ĊĊĠĠĠ Ġfun Ġfetch Province List ( callback : ĠCallback < List < Province >>) Ġ= Ġplace Service . get Pro vin ces (). enqueue ( callback ) ĊĊĠĠĠ Ġfun Ġfetch City List ( province Id : ĠInt , Ġcallback : ĠCallback < List < City >>) Ġ= Ġplace Service . getC ities ( province Id ). enqueue ( callback ) ĊĊĠĠĠ Ġfun Ġfetch Count y List ( province Id : ĠInt , Ġcity Id : ĠInt , Ġcallback : ĠCallback < List < Count y >>) Ġ= Ġplace Service . getCount ies ( province Id , Ġcity Id ). enqueue ( callback ) ĊĊĠĠĠ Ġfun Ġfetch Weather ( weather Id : ĠString , Ġkey : ĠString , Ġcallback : ĠCallback < He Weather >) Ġ= Ġweather Service . get Weather ( weather Id , Ġkey ). enqueue ( callback ) ĊĊĠĠĠ Ġfun Ġfetch B ing Pic ( callback : ĠCallback < String >) Ġ= Ġweather Service . getB ing P ck (). enqueue ( callback ) ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĊĠĠĠĠĠĠĠ Ġprivate Ġvar Ġnetwork : ĠCool Weather Network ? Ġ= Ġnull ĊĊĠĠĠĠĠĠĠ Ġfun ĠgetInstance (): ĠCool Weather Network Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( network Ġ== Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġsynchronized ( Cool Weather Network :: class . java ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġif Ġ( network Ġ== Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġnetwork Ġ= ĠCool Weather Network () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġnetwork !! ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} Ċ Ċ }