package Ġcom . mac ode . food ies . model . network čĊč Ċ import Ġcom . mac ode . food ies . model . entities . Random D ish č Ċ import Ġcom . mac ode . food ies . utilities . Constants č Ċ import Ġio . reactivex . rx java 3 . core . Single č Ċ import Ġretrofit 2 . Ret rofit č Ċ import Ġretrofit 2 . adapter . rx java 3 . Rx Java 3 Call Adapter Factory č Ċ import Ġretrofit 2 . converter . gson . Gson Converter Factory čĊč Ċ class ĠRandom D ish API Service Ġ{ čĊĠĠĠ Ġprivate Ġval Ġapi Ġ= ĠRet rofit . Builder (). baseUrl ( Constants . BASE _ URL ) čĊĠĠĠĠĠĠĠ Ġ. add Converter Factory ( Gson Converter Factory . create ()) čĊĠĠĠĠĠĠĠ Ġ. add Call Adapter Factory ( Rx Java 3 Call Adapter Factory . create ()) čĊĠĠĠĠĠĠĠ Ġ. build () čĊĠĠĠĠĠĠĠ Ġ. create ( Random D ish API :: class . java ) čĊčĊĠĠĠ Ġfun ĠgetRandom D ish (): ĠSingle < Random D ish . Recipes > Ġ{ čĊĠĠĠĠĠĠĠ Ġreturn Ġapi . getRandom D ish ( Constants . API _ KEY , ĠConstants . LIMIT _ LICENSE _ VALUE , ĠConstants . TAGS _ VALUE , ĠConstants . NUMBER _ VALUE ) čĊĠĠĠ Ġ} č Ċ }