package Ġno . nav . person br uk er . dit tn av . api . op pg ave Ċ Ċ import Ġio . ktor . client . HttpClient Ċ import Ġno . nav . person br uk er . dit tn av . api . config . get Ċ import Ġno . nav . person br uk er . dit tn av . common . security . Authenticated User Ċ import Ġjava . net . URL Ċ Ċ class ĠO pp g ave Consumer ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġclient : ĠHttpClient , ĊĠĠĠĠĠĠĠ Ġevent Handler Base URL : ĠURL , Ċ ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġinactive Events Endpoint Ġ= ĠURL ("$ event Handler Base URL / fetch / op pg ave / in akt ive ") ĊĠĠĠ Ġprivate Ġval Ġactive Events Endpoint Ġ= ĠURL ("$ event Handler Base URL / fetch / op pg ave / akt ive ") ĊĊĠĠĠ Ġsuspend Ġfun Ġget External Active Events ( user : ĠAuth enticated User ): ĠList < Opp g ave > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġget External Events ( user , Ġactive Events Endpoint ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget External Inactive Events ( user : ĠAuth enticated User ): ĠList < Opp g ave > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġget External Events ( user , Ġinactive Events Endpoint ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġsuspend Ġfun Ġget External Events ( user : ĠAuth enticated User , Ġcom lete Path To Endpoint : ĠURL ): ĠList < Opp g ave > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġclient . get ( com lete Path To Endpoint , Ġuser ) ĊĠĠĠ Ġ} Ċ } Ċ