package Ġcom . le mon . wan android . repository Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġcom . le mon . wan android . api . ApiResponse Ċ import Ġcom . le mon . wan android . api . ApiService Ċ import Ġcom . le mon . wan android . bean . Public Article Bean Ċ import Ġcom . le mon . wan android . bean . Public Article Data Bean Ċ import Ġcom . le mon . wan android . bean . Resource Ċ import Ġjavax . inject . Inject Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Singleton Ċ class ĠArticle Repository Ġ@ Inject Ġconstructor ( private Ġval Ġapi Service : ĠApi Service ) Ġ{ ĊĊĠĠĠ Ġfun Ġget Public Article (): LiveData < Resource < List < Public Article Bean >> >{ ĊĠĠĠĠĠĠĠ Ġreturn Ġobject Ġ: ĠNet Work Resource < List < Public Article Bean >> (){ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġcreate Call (): ĠLive Data < ApiResponse < List < Public Article Bean >>> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġapi Service . get Public Article () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ}. as LiveData () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Public Article Data ( page : ĠInt , id : ĠInt ) Ġ: ĠMutable LiveData < Resource < Public Article Data Bean >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġobject Ġ: ĠNet Work Resource < Public Article Data Bean > (){ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġcreate Call (): ĠLive Data < ApiResponse < Public Article Data Bean >> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġapi Service . get Public Article Data ( page , id ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ}. as Mutable LiveData () ĊĠĠĠ Ġ} Ċ Ċ }