package Ġcom . har old admin . cn rad apter . sample Ċ Ċ import Ġcom . har old admin . cn rad apter . Comp letable Response Ċ import Ġcom . har old admin . cn rad apter . Network Response Ċ import Ġkotlinx . serialization . Serializable Ċ import Ġretrofit 2 . http . Body Ċ import Ġretrofit 2 . http . GET Ċ import Ġretrofit 2 . http . POST Ċ import Ġretrofit 2 . http . Path Ċ Ċ @ Serializable Ċ data Ġclass ĠPost ( ĊĠĠĠ Ġval Ġid : ĠInt , ĊĠĠĠ Ġval Ġtitle : ĠString , ĊĠĠĠ Ġval Ġbody : ĠString , ĊĠĠĠ Ġval ĠuserId : ĠInt , Ċ ) Ċ Ċ @ Serializable Ċ data Ġclass ĠCreate Post Params ( ĊĠĠĠ Ġval Ġtitle : ĠString , ĊĠĠĠ Ġval Ġbody : ĠString , ĊĠĠĠ Ġval ĠuserId : ĠInt , Ċ ) Ċ Ċ @ Serializable Ċ class ĠError Response Ċ Ċ interface ĠPosts Service Ġ{ ĊĠĠĠ Ġ@ GET (" posts /{ post Id }") ĊĠĠĠ Ġsuspend Ġfun Ġget Post (@ Path (" post Id ") Ġpost Id : ĠInt ): ĠNetwork Response < Post , ĠError Response > ĊĊĠĠĠ Ġ@ GET (" posts /{ post Id }") ĊĠĠĠ Ġsuspend Ġfun Ġget Post WithError (@ Path (" post Id ") Ġpost Id : ĠInt ): ĠNetwork Response < String , ĠError Response > ĊĊĠĠĠ Ġ@ GET (" posts ") ĊĠĠĠ Ġsuspend Ġfun Ġget Posts (): ĠNetwork Response < List < Post >, ĠError Response > ĊĊĠĠĠ Ġ@ POST (" posts ") ĊĠĠĠ Ġsuspend Ġfun Ġcreate Post (@ Body Ġparams : ĠCreate Post Params ): ĠNetwork Response < Post , ĠError Response > Ċ } ĊĊ