package Ġcom . example . fly app . repositories Ċ Ċ import Ġcom . example . fly app . models . Air port Ċ import Ġcom . example . fly app . models . Air port Weather Ċ import Ġcom . example . fly app . models . kl ax on Ċ import Ġcom . github . kit tin un f . fuel . Fuel Ċ import Ġcom . github . kit tin un f . fuel . coroutines . await String Ċ Ċ class ĠAir port Weather Repository Ġ{ ĊĊĠĠĠ Ġsuspend Ġfun Ġget Air port Weather Data ( airport : ĠAir port ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġlat Ġ= Ġair port . lat ; Ġval Ġlon Ġ= Ġair port . lon ĊĠĠĠĠĠĠĠ Ġval Ġpath Ġ= Ġ" https :// in 2 0 0 0 - api proxy . ifi . u io . no / weather api / now cast / 2 . 0 / complete ? lat =$ lat & lon =$ lon " ĊĊĊĠĠĠĠĠĠĠ Ġval Ġresponse Ġ= Ġfrom Json ( Fuel . get ( path ). await String ()) ĊĊĠĠĠĠĠĠĠ Ġval Ġair port Weather Object Ġ= Ġresponse ?. get Weather Data () ĊĊĠĠĠĠĠĠĠ Ġif ( airport Weather Object Ġ!= Ġnull ) Ġair port . weather Object Ġ= Ġair port Weather Object ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġfrom Json ( json : ĠString ) Ġ= Ġkl ax on . parse < Air port Weather >( json ) Ċ Ċ } Ċ