package Ġcom . nom ad 5 . spark le . model . storage . ret ro C ouch Ċ Ċ import Ġcom . nom ad 5 . spark le . model . Answer Ċ import Ġcom . nom ad 5 . spark le . model . Category Ċ import Ġcom . nom ad 5 . spark le . model . Question Ċ import Ġokhttp 3 . ResponseBody Ċ import Ġretrofit 2 . Call Ċ import Ġretrofit 2 . http .* Ċ Ċ /**************************************************************** ******************************************************** **** Ċ Ġ* ĠThe ĠRet rofit Ġapi Ġdefinition Ġto Ġaccess Ġthe ĠCouch Db Ġrest Ġinterface Ċ Ġ*/ Ċ interface ĠCouch Db Api Ġ{ ĊĊĠĠĠ Ġ@ GET (" categories /_ all _ docs ") ĊĠĠĠ Ġfun Ġfetch Categories (@ Query (" include _ docs ") Ġinclude Docs : ĠBoolean Ġ= Ġtrue ): ĠCall < C ouch Db . Response < C ouch Db . All Docs Row < Category >>> ĊĊĠĠĠ Ġ@ GET (" questions /_ design / questions /_ view / by _ category ") ĊĠĠĠ Ġfun Ġfetch Questions By Category (@ Query (" key ") Ġcategory : ĠString ): ĠCall < C ouch Db . Response < C ouch Db . View Row < Question >>> ĊĊĠĠĠ Ġ@ GET (" questions /{ question Id }") ĊĠĠĠ Ġfun Ġfetch Question (@ Path (" question Id ") Ġid : ĠString ): ĠCall < Question > ĊĊĠĠĠ Ġ@ PUT (" answers /{ id }") ĊĠĠĠ Ġ@ Headers (" Content - Type : Ġapplication / json ") ĊĠĠĠ Ġfun Ġput Answer (@ Body Ġanswer : ĠAnswer , Ġ@ Path (" id ") Ġid : ĠString ): ĠCall < ResponseBody > Ċ }