Skip to content

Commit 74309ee

Browse files
committed
perfect doc
1 parent 2035c5c commit 74309ee

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

documents/APIs.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#### 5. 设置账号
4040
/// account 账号标识
4141
/// accountType 账号类型枚举
42+
/// note 同一账号类型对应一个唯一账号,覆盖操作,多账号体系请使用不同账号类型
4243
```dart
4344
void setAccount(String account, AccountType accountType);
4445
```
@@ -152,7 +153,8 @@
152153
_unRegistered 数据类型 String para: 注销成功或者失败信息
153154
```
154155

155-
#### 7 绑定账号和标签回调
156+
#### 7 绑定账号/标签/用户属性回调
157+
**说明**V1.2.8开始返回类型由String->Map,新增code及type标识!
156158
```dart
157159
_xgPushDidBindWithIdentifier 数据类型 Map<String, Object> para:
158160
key:
@@ -161,7 +163,8 @@
161163
msg: String类型,提示信息
162164
```
163165

164-
#### 8 解绑账号和标签回调
166+
#### 8 解绑账号/标签/用户属性回调
167+
**说明**V1.2.8开始返回类型由String->Map,新增code及type标识!
165168
```dart
166169
_xgPushDidUnbindWithIdentifier 数据类型 Map<String, Object> para:
167170
key:
@@ -170,7 +173,18 @@
170173
msg: String类型,提示信息
171174
```
172175

173-
#### 9 清除所有账号和标签回调
176+
#### 9 更新标签/用户属性回调
177+
**说明**V1.2.8开始返回类型由String->Map,新增code及type标识!
178+
```dart
179+
_xgPushDidUpdatedBindedIdentifier 数据类型 Map<String, Object> para:
180+
key:
181+
code:int类型,操作结果,0代表成功
182+
type: String类型,操作类型,取值为tag/attributes
183+
msg: String类型,提示信息
184+
```
185+
186+
#### 10 清除所有账号/标签/用户属性回调
187+
**说明**V1.2.8开始返回类型由String->Map,新增code及type标识!
174188
```dart
175189
_xgPushDidClearAllIdentifiers 数据类型 Map<String, Object> para:
176190
key:

example/lib/main.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,26 @@ class _MyAppState extends State<MyApp> {
6868
print("flutter xgPushDidSetBadge: $msg");
6969
_showAlert(msg);
7070
},
71+
72+
/// V1.2.8开始返回类型由String->Map,新增code及type标识!
7173
xgPushDidBindWithIdentifier: (Map<String, dynamic> result) async {
7274
print("flutter xgPushDidBindWithIdentifier: $result");
7375
_showAlert(result["msg"]);
7476
},
77+
78+
/// V1.2.8开始返回类型由String->Map,新增code及type标识!
7579
xgPushDidUnbindWithIdentifier: (Map<String, dynamic> result) async {
7680
print("flutter xgPushDidUnbindWithIdentifier: $result");
7781
_showAlert(result["msg"]);
7882
},
83+
84+
/// V1.2.8开始返回类型由String->Map,新增code及type标识!
7985
xgPushDidUpdatedBindedIdentifier: (Map<String, dynamic> result) async {
8086
print("flutter xgPushDidUpdatedBindedIdentifier: $result");
8187
_showAlert(result["msg"]);
8288
},
89+
90+
/// V1.2.8开始返回类型由String->Map,新增code及type标识!
8391
xgPushDidClearAllIdentifiers: (Map<String, dynamic> result) async {
8492
print("flutter xgPushDidClearAllIdentifiers: $result");
8593
_showAlert(result["msg"]);

lib/tpns_flutter_plugin.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,16 @@ class XgFlutterPlugin {
7878
/// 设置角标回调仅iOS
7979
EventHandler? _xgPushDidSetBadge;
8080

81-
/// 绑定账号和标签回调
81+
/// 绑定账号/标签/用户属性回调,V1.2.8开始返回类型由String->Map,新增code及type标识!
8282
EventHandlerMap? _xgPushDidBindWithIdentifier;
8383

84-
/// 解绑账号和标签回调
84+
/// 解绑账号/标签/用户属性回调,V1.2.8开始返回类型由String->Map,新增code及type标识!
8585
EventHandlerMap? _xgPushDidUnbindWithIdentifier;
8686

87-
/// 更新标签回调
87+
/// 更新标签/用户属性回调,V1.2.8开始返回类型由String->Map,新增code及type标识!
8888
EventHandlerMap? _xgPushDidUpdatedBindedIdentifier;
8989

90-
/// 清除所有账号和标签回调
90+
/// 清除所有账号/标签/用户属性回调,V1.2.8开始返回类型由String->Map,新增code及type标识!
9191
EventHandlerMap? _xgPushDidClearAllIdentifiers;
9292

9393
/// 获取sdk版本号

0 commit comments

Comments
 (0)