Helius
2020-05-27 2dd3a086f2edeb9f364935c3fb98f18c2eea2fa8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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;
    }
}