package com.xcong.excoin.utils.api.response;
|
|
|
import com.xcong.excoin.utils.api.ApiException;
|
|
public class KlineResponse<T> {
|
|
private String status;
|
/**
|
* 接口名
|
*/
|
private String ch;
|
/**
|
* 时间格式
|
*/
|
private String ts;
|
public String errCode;
|
public String errMsg;
|
/**
|
* 数据
|
*/
|
public T data;
|
|
public T checkAndReturn() {
|
if ("ok".equals(status)) {
|
return data;
|
}
|
throw new ApiException(errCode, errMsg);
|
}
|
|
|
public String getStatus() {
|
return status;
|
}
|
|
public void setStatus(String status) {
|
this.status = status;
|
}
|
|
public String getCh() {
|
return ch;
|
}
|
|
public void setCh(String ch) {
|
this.ch = ch;
|
}
|
|
public String getTs() {
|
return ts;
|
}
|
|
public void setTs(String ts) {
|
this.ts = ts;
|
}
|
}
|