How to send search suggestions dynamically to data source's retrofit params and get updated pagedlist in Android jetpack paging library?
Here's my web function in retrofit web service that brings data.
@GET(version + "/get-bills")
Call<ApiResponse<BillsModel>> getPartnerBillsSorted(@Query("page")int page, @Query("type")int type,@Query("search")String search );
This api is being called in data source and it gives me listing of all data, which i am listing in reyclerview using pagedlist. But i am quite confused and dont know how do i give call to this api in Data source on runtime, and then get updated pagedlist based on what i am seaching in autocompleteTextview.
what should i do? should i make new instance of datasource and data source factory and pagelist everytime i tap something in autocomplete or how do i dynamically change same datasource call and get updated pagelist?