Unverified Commit 77e4ee78 authored by Yang Libin's avatar Yang Libin Committed by GitHub

chore: add sync workflow (#36)

parent 4fb1d062
name: Sync
on:
push:
branches: [main, dev]
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
if: github.repository == 'doocs/qcloud-im-server-sdk-java'
steps:
- name: Sync to gitee.com
uses: wearerequired/git-mirror-action@master
env:
SSH_PRIVATE_KEY: ${{ secrets.RSA_PRIVATE_KEY }}
with:
source-repo: git@github.com:doocs/qcloud-im-server-sdk-java.git
destination-repo: git@gitee.com:Doocs/qcloud-im-server-sdk-java.git
...@@ -22,7 +22,7 @@ Add the Maven dependency: ...@@ -22,7 +22,7 @@ Add the Maven dependency:
<dependency> <dependency>
<groupId>io.github.doocs</groupId> <groupId>io.github.doocs</groupId>
<artifactId>im-server-sdk-java</artifactId> <artifactId>im-server-sdk-java</artifactId>
<version>0.0.9</version> <version>0.1.0</version>
</dependency> </dependency>
``` ```
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<groupId>io.github.doocs</groupId> <groupId>io.github.doocs</groupId>
<artifactId>im-server-sdk-java</artifactId> <artifactId>im-server-sdk-java</artifactId>
<version>0.0.9</version> <version>0.1.0</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>qcloud-im-server-sdk-java</name> <name>qcloud-im-server-sdk-java</name>
......
package io.github.doocs.im.core;
import io.github.doocs.im.IMClient;
import io.github.doocs.im.model.request.AccountImportRequest;
import io.github.doocs.im.model.response.AccountImportResult;
import java.io.IOException;
/**
* @author bingo
* @since 2021/8/4 15:40
*/
public class Main {
public static void main(String[] args) {
// type your sdkAppId here
long appId = 1400554812;
// type your adminUserId here
String identifier = "test";
// type your applicationKey here
String key = "60c6c5925f3ae52c7325ac5a8ec78e44c056d1dd84d54e12ffa39911267a2a70";
// create ImClient instance
IMClient client = IMClient.getInstance(appId, identifier, key);
// import account
AccountImportRequest request = new AccountImportRequest();
request.setFaceUrl("https://avatars.githubusercontent.com/u/21008209?v=4");
request.setIdentifier("ylb");
request.setNick("nickname");
try {
AccountImportResult result = client.account.accountImport(request);
System.out.println(result);
} catch (IOException e) {
e.printStackTrace();
}
}
}
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