master
kira 6 years ago
parent bedba86e89
commit f060e2fcd3

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

Loading…
Cancel
Save