Helius
2020-07-10 2de586f551dac45be50eebadf4c377999bba6ff7
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);
    }
}