master
kira 6 years ago
parent bedba86e89
commit f060e2fcd3

@ -105,25 +105,25 @@ public class OpenimClient {
} }
public static void main(String[] args) { // public static void main(String[] args) {
String appkey = "24960261"; // String appkey = "24960261";
String secret = "7639427973bd671be15c9d0c1e9c90b4"; // String secret = "7639427973bd671be15c9d0c1e9c90b4";
String url = "https://eco.taobao.com/router/rest"; // String url = "https://eco.taobao.com/router/rest";
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); // TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
OpenimUsersAddRequest req = new OpenimUsersAddRequest(); // OpenimUsersAddRequest req = new OpenimUsersAddRequest();
List<Userinfos> list2 = new ArrayList<Userinfos>(); // List<Userinfos> list2 = new ArrayList<Userinfos>();
Userinfos obj3 = new Userinfos(); // Userinfos obj3 = new Userinfos();
list2.add(obj3); // list2.add(obj3);
obj3.setNick("im123"); // obj3.setNick("im123");
obj3.setUserid("im123"); // obj3.setUserid("im123");
obj3.setPassword("xxxxxx"); // obj3.setPassword("xxxxxx");
req.setUserinfos(list2); // req.setUserinfos(list2);
OpenimUsersAddResponse rsp = null; // OpenimUsersAddResponse rsp = null;
try { // try {
rsp = client.execute(req); // rsp = client.execute(req);
} catch (ApiException e) { // } catch (ApiException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
System.out.println(rsp.getBody()); // System.out.println(rsp.getBody());
} // }
} }

Loading…
Cancel
Save