package Ġcom . ch ata . app . data . api Ċ Ċ import Ġcom . ch ata . app . data . DataSource Ċ import Ġcom . ch ata . app . data . entity . network . Product Cluster Response Ċ import Ġcom . ch ata . app . data . entity . Product Detail Ċ import Ġcom . rx 2 android networking . Rx 2 Android Networking Ċ import Ġio . reactivex . Single Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠApi Service Ġ@ Inject Ġconstructor () Ġ: ĠDataSource Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġget Products (): ĠSingle < Product Cluster Response > Ġ= ĊĠĠĠĠĠĠĠ ĠRx 2 Android Networking . get (" https :// 6 0 1 8 2 7 3 1 9 7 1 d 8 5 0 0 1 7 a 3 f 9 e 4 . mock api . io / api / products ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. getObject Single ( Product Cluster Response :: class . java ) ĊĊĠĠĠ Ġoverride Ġfun Ġget Product ( id : ĠString ): ĠSingle < Product Detail > Ġ= ĊĠĠĠĠĠĠĠ ĠRx 2 Android Networking . get (" https :// 6 0 1 8 2 7 3 1 9 7 1 d 8 5 0 0 1 7 a 3 f 9 e 4 . mock api . io / api / product /$ id ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. getObject Single ( Product Detail :: class . java ) Ċ }