/* ĠReleased Ġunder Ġthe ĠMIT Ġlicense , Ġ 2 0 1 9 Ġ*/ Ċ Ċ package Ġcom . github . ptr te ix e ira . nus ports Ċ Ċ import Ġcom . fasterxml . jackson . databind . Deserialization Feature Ċ import Ġcom . fasterxml . jackson . databind . ObjectMapper Ċ import Ġcom . fasterxml . jackson . module . kotlin . Kotlin Module Ċ import Ġcom . github . ptr te ix e ira . nus ports . dao . C aa Service Ċ import Ġcom . github . ptr te ix e ira . nus ports . dao . Nu Document Source Ċ import Ġcom . github . ptr te ix e ira . nus ports . dao . Schedule Dao Ċ import Ġcom . github . ptr te ix e ira . nus ports . dao . Stand ings Dao Ċ import Ġcom . github . ptr te ix e ira . nus ports . model . Match Ċ import Ġcom . github . ptr te ix e ira . nus ports . model . Nu Web Sc raper Ċ import Ġcom . github . ptr te ix e ira . nus ports . model . Stand ing Ċ import Ġcom . github . ptr te ix e ira . nus ports . model . Web Sc raper Ċ import Ġcom . github . ptr te ix e ira . nus ports . model . Web Sc raper Factory Ċ import Ġokhttp 3 . Ok HttpClient Ċ import Ġretrofit 2 . Ret rofit Ċ import Ġretrofit 2 . converter . jackson . Jack son Converter Factory Ċ import Ġjava . time . Clock Ċ Ċ class ĠNu Web Sc raper Factory Ġ: ĠWeb Sc raper Factory Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġbuild (): ĠWeb Sc raper Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġschedule Cache Ġ= Ġmutable Map Of < String , ĠList < Match >>() ĊĠĠĠĠĠĠĠ Ġval Ġstand ings Cache Ġ= Ġmutable Map Of < String , ĠList < Stand ing >>() ĊĠĠĠĠĠĠĠ Ġval Ġclock Ġ= ĠClock . system Default Zone () ĊĊĠĠĠĠĠĠĠ Ġval Ġclient Ġ= ĠOk HttpClient () ĊĠĠĠĠĠĠĠ Ġval ĠobjectMapper Ġ= ĠObjectMapper () ĊĠĠĠĠĠĠĠ ĠobjectMapper . register Module ( Kotlin Module ()) ĊĠĠĠĠĠĠĠ ĠobjectMapper . enable ( Deserialization Feature . READ _ ENUM S _ USING _ TO _ STRING ) ĊĊĠĠĠĠĠĠĠ Ġval Ġretrofit Ġ= ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. client ( client ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl (" https :// ca as ports . com ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Jack son Converter Factory . create ( object Mapper )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġval Ġc aa Source Ġ= Ġretrofit . create ( C aa Service :: class . java ) ĊĠĠĠĠĠĠĠ Ġval Ġschedule Dao Ġ= ĠSchedule Dao ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġschedule Cache , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclock , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġc aa Source ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġdocument Source Ġ= ĠNu Document Source ( client ) ĊĠĠĠĠĠĠĠ Ġval Ġstand ings Dao Ġ= ĠStand ings Dao ( stand ings Cache , Ġdocument Source ) ĊĊĠĠĠĠĠĠĠ Ġreturn ĠNu Web Sc raper ( schedule Dao , Ġstand ings Dao ) ĊĠĠĠ Ġ} Ċ }