You can use ArrayList
like;
Call<YourResponseType> yourFunc(@Query("gfe_rd") String value, @Query("ei") ArrayList<String> eiValues, @Query("ej") ArrayList<String> eJvalues,...);
it will work like;
http://yourUrl.com/gfe_rd=cr&ei=1&ei=2...
or you can do it with using path
and a for
.
String path = "/?";
for (int i = 0; i < yourQueryCount ; i ++ ){
if (i == 0)
path += "gfe_rd" + yourValue;
else if ( i < 5)
path += "ei=" + yourDynamicValueArrayForEi[i];
else if ( i < 7)
path += "ej=" + yourDynamicValueArrayForEj[i];
.
.
.
if (i < yourQueryCount-1)
path += "&";
}
and give that path to your retrofit function;
@GET("{yourPath}")
Call<YourResponseType> yourFunc(@Path("yourPath") String path);