Мой API:
https://api.domainname.com/25/SmartService.svc/GetFundslistByPANIMEI=ODY2NzQxMDMzNDQwMjQx%0A&Fund=&APKVer=NC4zMg%3D%3D%0A&pan=QUZZUE01NzE5Qg%3D%3D%0A&Adminusername=c21hcnRzZXJ2aWNl&OS=QW5kcm9pZA%3D%3D%0A&Adminpassword=a2FydnkxMjM0JTI0
И респон JSON в приведенном выше URL-адресе, как показано ниже
{"Table":[{"Error_code":"0","Error_Message":"Success","EncryptionFlag":"N"}
],"Table1":[{"Fund_Id":"128","FN_FundDescription":"ABCD FUND"},{"Fund_Id":"178","FN_FundDescription":"XYZ FUND"},{"Fund_Id":"116","FN_FundDescription":"Pritham FUND"},{"Fund_Id":"118","FN_FundDescription":"Ram FUND"},{"Fund_Id":"130","FN_FundDescription":"Mannu FUND"}]}
Я взял baseurl как https://api.domainname/25/SmartService.svc в основной деятельности. java
Может ли любое тело сказать мне, как вызвать остальную часть URL-адреса в интерфейсе. java класс как @GET ("");
Я сгенерировал классы pojo и он сгенерировал 3 класса.
1 .Пример. java
package com.example.retrofit;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Example {
@SerializedName("Table")
@Expose
private List<Table> table = null;
@SerializedName("Table1")
@Expose
private List<Table1> table1 = null;
public List<Table> getTable() {
return table;
}
public void setTable(List<Table> table) {
this.table = table;
}
public List<Table1> getTable1() {
return table1;
}
public void setTable1(List<Table1> table1) {
this.table1 = table1;
}
}
2. Таблица. java
package com.example.retrofit;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Table {
@SerializedName("Error_code")
@Expose
private String errorCode;
@SerializedName("Error_Message")
@Expose
private String errorMessage;
@SerializedName("EncryptionFlag")
@Expose
private String encryptionFlag;
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public String getEncryptionFlag() {
return encryptionFlag;
}
public void setEncryptionFlag(String encryptionFlag) {
this.encryptionFlag = encryptionFlag;
}
}
3 .Table1. java пакет com.example.retrofit;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Table1 {
@SerializedName("Fund_Id")
@Expose
private String fundId;
@SerializedName("FN_FundDescription")
@Expose
private String fNFundDescription;
public String getFundId() {
return fundId;
}
public void setFundId(String fundId) {
this.fundId = fundId;
}
public String getFNFundDescription() {
return fNFundDescription;
}
public void setFNFundDescription(String fNFundDescription) {
this.fNFundDescription = fNFundDescription;
}
}
ТАК, пожалуйста, помогите мне, как получить параметры из оставшихся URL и использовать его с querymap concept.so, чтобы я мог отобразить ответ json в recyclerview.