From dc0a2cd582ffccf3da69a51aef2c40f3ffff243e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Tue, 11 Jan 2022 10:20:26 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20=E5=AE=8C=E5=96=84Readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 91818e7..8660deb 100644 --- a/README.md +++ b/README.md @@ -1 +1,31 @@ -# txim +# 腾讯云即时通讯IM SDK + +### 食用方式 + +```go +package main + +import ( + "fmt" + "gitee.ltd/lxh/txim" + "gitee.ltd/lxh/txim/api" + "gitee.ltd/lxh/txim/api/param" +) + +func main() { + sdkAppId := 0000 + sdkKey := "xxxxx" + // 初始化SDK + txim.Init(sdkAppId, sdkKey, "administrator") + // 导入账户 + data, err := api.AccountImport(¶m.AccountImportReq{ + Identifier: "lxh", + Nick: "李寻欢", + }) + if err != nil { + fmt.Println(err) + return + } + fmt.Printf("%+v\n", data) +} +```