Helius
2020-06-08 d350357c05707b8d6db5f800b47363dd22aa4eaf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.xcong.excoin.utils.api.response;
 
 
import com.xcong.excoin.utils.api.ApiException;
 
public class ApiResponse<T> {
 
    public String status;
    public String errCode;
    public String errMsg;
    public T data;
 
    public T checkAndReturn() {
        if ("ok".equals(status)) {
            return data;
        }
        throw new ApiException(errCode, errMsg);
    }
}