Commit 456d3cca authored by yanglbme's avatar yanglbme

docs: update readme document

parent 0b262aa9
...@@ -31,32 +31,27 @@ Add the Maven dependency: ...@@ -31,32 +31,27 @@ Add the Maven dependency:
Here is a quick teaser of an application using IM SDK in Java: Here is a quick teaser of an application using IM SDK in Java:
```java ```java
public class Main { // sdk appId
public static void main(String[] args) { long appId = 1400554812;
// type your sdkAppId here
long appId = 1400554812; // admin userId
String identifier = "test";
// type your adminUserId here
String identifier = "test"; // application key
String key = "60c6c5925f3ae52c7325ac5a8ec78e44c056d1dd84d54e12ffa39911267a2a70";
// type your applicationKey here
String key = "60c6c5925f3ae52c7325ac5a8ec78e44c056d1dd84d54e12ffa39911267a2a70"; // create ImClient instance
IMClient client = IMClient.getInstance(appId, identifier, key);
// create ImClient instance
IMClient client = IMClient.getInstance(appId, identifier, key); // import account
AccountImportRequest request = new AccountImportRequest("doocs");
// import account request.setFaceUrl("https://avatars.githubusercontent.com/u/43716716?s=200&v=4");
AccountImportRequest request = new AccountImportRequest(); request.setNick("Doocs Community");
request.setFaceUrl("https://avatars.githubusercontent.com/u/43716716?s=200&v=4"); try {
request.setIdentifier("doocs");
request.setNick("Doocs Community");
try {
AccountImportResult result = client.account.accountImport(request); AccountImportResult result = client.account.accountImport(request);
System.out.println(result); // handle result
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); // handle exception
}
}
} }
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment