Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // пример запроса
- http://fe-ct.svc.iptv.rt.ru/smarttube/master/spine/services/json/ott/get_network_config?uid=123321
- // response класс для него
- public class NetworkConfigRs extends Rs {
- public static class Url {
- @SerializedName("url")
- public String url;
- }
- public static class Data {
- @SerializedName("frontend")
- public Url frontend;
- @SerializedName("proxy")
- public Url proxy;
- @SerializedName("deviceType")
- public String deviceType;
- @SerializedName("homeMrf")
- public String homeMrf;
- @SerializedName("curMrf")
- public String curMrf;
- @SerializedName("curLocation")
- public String curLocation;
- @SerializedName("curSubLocation")
- public String curSubLocation;
- @Override
- public String toString() {
- return "Data{" +
- "frontend=" + frontend +
- ", proxy=" + proxy +
- ", deviceType='" + deviceType + '\'' +
- ", homeMrf='" + homeMrf + '\'' +
- ", curMrf='" + curMrf + '\'' +
- ", curLocation='" + curLocation + '\'' +
- ", curSubLocation='" + curSubLocation + '\'' +
- '}';
- }
- }
- public static class Rows {
- public Data[] data;
- }
- @SerializedName("rows")
- public Rows rows;
- }
- // использование этого класса
- NetworkConfigRs rs = methodsServerSDP.getNetworkConfig("123321", null);
- String url = rs.rows.data[0].frontend.url;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement