package Ġcom . al vin h kh . bu set a . k mb Ċ Ċ import Ġcom . al vin h kh . bu set a . App . Companion . httpClient Ċ import Ġcom . al vin h kh . bu set a . App . Companion . httpClient Unsafe Ċ import Ġcom . al vin h kh . bu set a . k mb . model . K mb BB I 2 Ċ import Ġcom . al vin h kh . bu set a . k mb . model . K mb Eta Routes Ċ import Ġcom . al vin h kh . bu set a . k mb . model . K mb Routes In Stop Ċ import Ġcom . al vin h kh . bu set a . k mb . model . network .* Ċ import Ġcom . google . gson . Gson Ċ import Ġcom . google . gson . Gson Builder Ċ import Ġcom . jak ew h art on . ret rofit 2 . adapter . kotlin . coroutines . Coroutine Call Adapter Factory Ċ import Ġkotlinx . coroutines . Deferred Ċ import Ġokhttp 3 . ResponseBody Ċ import Ġretrofit 2 . Call Ċ import Ġretrofit 2 . Response Ċ import Ġretrofit 2 . Ret rofit Ċ import Ġretrofit 2 . converter . gson . Gson Converter Factory Ċ import Ġretrofit 2 . http .* Ċ Ċ interface ĠK mb Service Ġ{ ĊĠĠĠ Ġ@ GET (" ajax / BB I / get _ BB I 2 . php ?& bus company = null & jt Sorting = sec _ rout eno % 2 0 ASC ") ĊĠĠĠ Ġfun Ġb bi (@ Query (" rout eno ") Ġrout eno : ĠString ?, Ġ@ Query (" bound ") Ġbound : ĠString ?): ĠDeferred < Response < K mb BB I 2 >> ĊĊĠĠĠ Ġ@ GET (" ajax / BB I / get _ BB I 2 . php ?& bus company = null & jt Sorting = sec _ rout eno % 2 0 ASC ") ĊĠĠĠ Ġfun Ġb bi (@ Query (" rout eno ") Ġrout eno : ĠString ?, Ġ@ Query (" bound ") Ġbound : ĠString ?, Ġ@ Query (" inter change Type ") Ġinter change Type : ĠString ?): ĠDeferred < Response < K mb BB I 2 >> ĊĊĠĠĠ Ġ@ GET (" Function / Function Request . ash x ? action = get Route Bound ") ĊĠĠĠ Ġfun Ġroute Bound (@ Query (" route ") Ġroute : ĠString ?): ĠCall < K mb Route Bound Res > ĊĊĠĠĠ Ġ@ GET (" Function / Function Request . ash x ? action = get Special Route ") ĊĠĠĠ Ġfun Ġspecial Route (@ Query (" route ") Ġroute : ĠString ?, Ġ@ Query (" bound ") Ġbound : ĠString ?): ĠCall < K mb Special Route Res > ĊĊĠĠĠ Ġ@ GET (" Function / Function Request . ash x ? action = get Stops ") ĊĠĠĠ Ġfun Ġstops (@ Query (" route ") Ġroute : ĠString ?, Ġ@ Query (" bound ") Ġbound : ĠString ?, Ġ@ Query (" service Type ") Ġservice Type : ĠString ?): ĠCall < K mb Stops Res > ĊĊĠĠĠ Ġ@ GET (" Function / Function Request . ash x ? action = get Routes In Stop ") ĊĠĠĠ Ġfun Ġroutes In Stop (@ Query (" b si Code ") Ġb si Code : ĠString ?): ĠCall < K mb Routes In Stop > ĊĊĠĠĠ Ġ@ GET (" Function / Function Request . ash x ? action = get Anno unce ") ĊĠĠĠ Ġfun Ġannounce (@ Query (" route ") Ġroute : ĠString ?, Ġ@ Query (" bound ") Ġbound : ĠString ?): ĠDeferred < Response < K mb Anno unce Res >> ĊĊĠĠĠ Ġ@ GET (" Function / Function Request . ash x ? action = get schedule ") ĊĠĠĠ Ġfun Ġschedule (@ Query (" route ") Ġroute : ĠString ?, Ġ@ Query (" bound ") Ġbound : ĠString ?): ĠDeferred < Response < K mb Schedule Res >> ĊĊĠĠĠ Ġ@ GET (" Anno uncement Picture . ash x ") ĊĠĠĠ Ġfun Ġanno uncement Picture (@ Query (" url ") Ġurl : ĠString ?): ĠDeferred < Response < ResponseBody >> ĊĊĠĠĠ Ġ@ Form Url Encoded ĊĠĠĠ Ġ@ POST (" Function / Function Request . ash x /? action = get _ ETA ") ĊĠĠĠ Ġfun Ġeta (@ Query (" lang ") Ġlang : ĠString ?, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Field (" token ") Ġtoken : ĠString ?, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ@ Field (" t ") Ġt : ĠString ?): ĠCall < K mb Web Eta Res > ĊĊĠĠĠ Ġ@ Headers (" Content - Type : Ġapplication / json ") ĊĠĠĠ Ġ@ POST (" ? action = get eta ") ĊĠĠĠ Ġfun Ġeta (@ Body Ġbody : ĠK mb Eta Request ): ĠCall < List < K mb Eta Res >> ĊĊĠĠĠ Ġ@ GET (" GetData . ash x ? type = ETA _ R ") ĊĠĠĠ Ġfun Ġeta Routes (): ĠCall < List < K mb Eta Routes >> ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġconst Ġval ĠAN NOUN CE MENT _ PI CTURE Ġ= Ġ" http :// search . k mb . hk / K MB Web Site / Anno uncement Picture . ash x ? url =" ĊĠĠĠĠĠĠĠ Ġval Ġgson : ĠGson Ġ= ĠGson Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. serialize Null s () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. create () ĊĠĠĠĠĠĠĠ Ġval Ġweb Coroutine : ĠRet rofit Ġ= ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. client ( httpClient ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl (" http :// www . k mb . hk /") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ( gson )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Call Adapter Factory ( Coroutine Call Adapter Factory . invoke ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġval Ġweb Search : ĠRet rofit Ġ= ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. client ( httpClient ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl (" https :// search . k mb . hk / K MB Web Site /") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ( gson )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġval Ġweb Search Coroutine : ĠRet rofit Ġ= ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. client ( httpClient ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl (" http :// search . k mb . hk / K MB Web Site /") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ( gson )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Call Adapter Factory ( Coroutine Call Adapter Factory . invoke ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġval Ġweb Search Html Coroutine : ĠRet rofit Ġ= ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. client ( httpClient ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl (" http :// search . k mb . hk / K MB Web Site /") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Call Adapter Factory ( Coroutine Call Adapter Factory . invoke ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġval Ġet av 3 : ĠRet rofit Ġ= ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. client ( httpClient Unsafe ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl (" https :// et av 3 . k mb . hk ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ( gson )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġval Ġet adata feed : ĠRet rofit Ġ= ĠRet rofit . Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. client ( httpClient ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. baseUrl (" http :// et adata feed . k mb . hk : 1 9 3 3 ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ( gson )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠ Ġ} Ċ }