|
@@ -8,6 +8,7 @@ import com.dliyun.Response;
|
|
|
import org.junit.Test;
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
|
|
+import java.util.Collections;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
@@ -115,7 +116,7 @@ public class TestSdk {
|
|
|
@Test
|
|
@Test
|
|
|
public void sendPhoneValidateCode() throws ClientException {
|
|
public void sendPhoneValidateCode() throws ClientException {
|
|
|
Map<String, Object> dataMap = new HashMap<>();
|
|
Map<String, Object> dataMap = new HashMap<>();
|
|
|
- dataMap.put("phone", "15674880847");
|
|
|
|
|
|
|
+ dataMap.put("phone", "18073113118");
|
|
|
dataMap.put("captchaCode", "kan4x");
|
|
dataMap.put("captchaCode", "kan4x");
|
|
|
dataMap.put("captchaKey", "81e50122a3f2617c00bf92205609329b");
|
|
dataMap.put("captchaKey", "81e50122a3f2617c00bf92205609329b");
|
|
|
Response<Map<String, Object>> response = this.getClient().execute("oauth2.send.phone.validate.code", "1.0.0", dataMap);
|
|
Response<Map<String, Object>> response = this.getClient().execute("oauth2.send.phone.validate.code", "1.0.0", dataMap);
|
|
@@ -125,7 +126,7 @@ public class TestSdk {
|
|
|
@Test
|
|
@Test
|
|
|
public void sendPhoneLogin() throws ClientException {
|
|
public void sendPhoneLogin() throws ClientException {
|
|
|
Map<String, Object> dataMap = new HashMap<>();
|
|
Map<String, Object> dataMap = new HashMap<>();
|
|
|
- dataMap.put("phone", "15674880847");
|
|
|
|
|
|
|
+ dataMap.put("phone", "18073113118");
|
|
|
dataMap.put("code", "271923");
|
|
dataMap.put("code", "271923");
|
|
|
dataMap.put("id", "0ddd1226f73fa454566b36d69ea1abe6");
|
|
dataMap.put("id", "0ddd1226f73fa454566b36d69ea1abe6");
|
|
|
Response<Map<String, Object>> response = this.getClient().execute("oauth2.phone.login", "1.0.0", dataMap);
|
|
Response<Map<String, Object>> response = this.getClient().execute("oauth2.phone.login", "1.0.0", dataMap);
|
|
@@ -135,7 +136,7 @@ public class TestSdk {
|
|
|
@Test
|
|
@Test
|
|
|
public void startSpider() throws ClientException {
|
|
public void startSpider() throws ClientException {
|
|
|
Map<String, Object> dataMap = new HashMap<>();
|
|
Map<String, Object> dataMap = new HashMap<>();
|
|
|
- dataMap.put("ids", Arrays.asList("220315171635"));
|
|
|
|
|
|
|
+ dataMap.put("ids", Collections.singletonList("220315171635"));
|
|
|
Response<Map<String, Object>> response = this.getClient().execute("sentiment.spider.event.startSpider", "1.0.0", dataMap);
|
|
Response<Map<String, Object>> response = this.getClient().execute("sentiment.spider.event.startSpider", "1.0.0", dataMap);
|
|
|
System.out.println(JSON.toJSONString(response));
|
|
System.out.println(JSON.toJSONString(response));
|
|
|
}
|
|
}
|
|
@@ -143,7 +144,7 @@ public class TestSdk {
|
|
|
@Test
|
|
@Test
|
|
|
public void sendForgetPassword() throws ClientException {
|
|
public void sendForgetPassword() throws ClientException {
|
|
|
Map<String, Object> dataMap = new HashMap<>();
|
|
Map<String, Object> dataMap = new HashMap<>();
|
|
|
- dataMap.put("phone", "15674880847");
|
|
|
|
|
|
|
+ dataMap.put("phone", "18073113118");
|
|
|
dataMap.put("code", "457100");
|
|
dataMap.put("code", "457100");
|
|
|
dataMap.put("id", "c4fb91adcf9bd8683aab344c3568e5f8");
|
|
dataMap.put("id", "c4fb91adcf9bd8683aab344c3568e5f8");
|
|
|
dataMap.put("password", "123456");
|
|
dataMap.put("password", "123456");
|