通过SDK可快速调用API接口, 查看详情
运行环境要求jdk >= 1.8
-
在Maven中央仓库中搜索juliangip 即可获取SDK依赖jar和dependency依赖下载
-
在pom文件中填写下方依赖配置即可
<dependency> <groupId>com.juliangip</groupId> <artifactId>juliang_sdk</artifactId> <version>1.0.1</version> </dependency>
前往Gitee 巨量云JAVA-SDK 下载最新的源代码,然后解压导入到项目中使用
import com.juliang.JuLiang;
import com.juliang.common.DynamicReplaceWhiteIp;
import com.juliang.common.UsersGetBalance;
import org.junit.Test;
import java.util.Map;
public class test {
private String userId = "your User ID";
private String AccessKey = "User AccessKey";
private String dynamicKey = "dynamicKey";
private String dynamicTradeNo = "dynamicTradeNo";
@Test
public void test1() throws Exception{
String resp = JuLiang.usersGetBalance(new UsersGetBalance()
.setKey("AccessKey")
.setUser_id("userId"));
System.out.println(resp);
}
@Test
public void dyReplaceWhiteIp() throws IllegalAccessException {
String resp = JuLiang.dynamicReplaceWhiteIp(new DynamicReplaceWhiteIp()
.setTrade_no(dynamicTradeNo)
.setKey(dynamicKey)
.setNew_ip("11.12.13.14,15.16.17.18")
.setOld_ip("3.3.3.9")
.setReset("1"));
System.out.println(resp);
}
}