package Ġio . github . fe elf re el inux . wy kop mob il ny . api . tag Ċ Ċ import Ġio . github . fe elf re el inux . wy kop mob il ny . api . User Token Refresh er Ċ import Ġio . github . fe elf re el inux . wy kop mob il ny . api . error handler . ErrorHandler Ċ import Ġio . github . fe elf re el inux . wy kop mob il ny . api . error handler . ErrorHandler Transformer Ċ import Ġio . github . fe elf re el inux . wy kop mob il ny . models . mapper . apiv 2 . Tag Entries Mapper Ċ import Ġio . github . fe elf re el inux . wy kop mob il ny . models . mapper . apiv 2 . Tag Links Mapper Ċ import Ġio . github . fe elf re el inux . wy kop mob il ny . models . pojo . apiv 2 . models . Tag State Response Ċ import Ġio . github . fe elf re el inux . wy kop mob il ny . models . pojo . apiv 2 . responses . Tag Entries Response Ċ import Ġio . github . fe elf re el inux . wy kop mob il ny . models . pojo . apiv 2 . responses . Tag Links Response Ċ import Ġretrofit 2 . Ret rofit Ċ Ċ class ĠTag Repository ( ret rofit : ĠRet rofit , Ġval Ġuser Token Refresh er : ĠUser Token Refresh er ) Ġ: ĠTag Api Ġ{ ĊĠĠĠ Ġprivate Ġval Ġtag Api Ġby Ġlazy Ġ{ Ġretrofit . create ( Tag Ret rofit Api :: class . java ) Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Tag Entries ( tag Ġ: ĠString , Ġpage Ġ: ĠInt ) Ġ= Ġtag Api . getTag Entries ( tag , Ġpage ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. retry When ( user Token Refresh er ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. flatMap ( ErrorHandler < Tag Entries Response >()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĠTag Entries Mapper . map ( it )} ĊĊĠĠĠ Ġoverride Ġfun Ġget Tag Links ( tag Ġ: ĠString , Ġpage Ġ: ĠInt ) Ġ= Ġtag Api . getTag Links ( tag , Ġpage ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. retry When ( user Token Refresh er ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. flatMap ( ErrorHandler < Tag Links Response >()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ ĠTag Links Mapper . map ( it )} ĊĊĠĠĠ Ġoverride Ġfun Ġobserve ( tag Ġ: ĠString ) Ġ= Ġtag Api . observe ( tag ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. retry When ( user Token Refresh er ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. compose < Tag State Response >( ErrorHandler Transformer ()) ĊĊĠĠĠ Ġoverride Ġfun Ġun observe ( tag Ġ: ĠString ) Ġ= Ġtag Api . un observe ( tag ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. retry When ( user Token Refresh er ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. compose < Tag State Response >( ErrorHandler Transformer ()) ĊĊĠĠĠ Ġoverride Ġfun Ġblock ( tag Ġ: ĠString ) Ġ= Ġtag Api . block ( tag ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. retry When ( user Token Refresh er ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. compose < Tag State Response >( ErrorHandler Transformer ()) ĊĊĠĠĠ Ġoverride Ġfun Ġun block ( tag Ġ: ĠString ) Ġ= Ġtag Api . un block ( tag ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. retry When ( user Token Refresh er ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. compose < Tag State Response >( ErrorHandler Transformer ()) Ċ }