cloud189-sdk 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1 +1,51 @@
1
- # cloud189-sdk
1
+ # cloud189-sdk
2
+
3
+ ## 安装依赖
4
+ ``` bash
5
+ npm i cloud189-sdk
6
+ ```
7
+ 或者
8
+ ``` bash
9
+ yarn add cloud189-sdk
10
+ ```
11
+ ## 测试代码
12
+ ``` javascript
13
+ const { CloudClient } = require("cloud189-sdk");
14
+
15
+ const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
16
+ (async () => {
17
+ const client = new CloudClient(
18
+ 'your username',
19
+ 'your password'
20
+ );
21
+ await client.login();
22
+ const t1 = await client.userSign();
23
+ console.log(t1);
24
+ await delay(5000);
25
+ const t2 = await client.taskSign();
26
+ console.log(t2);
27
+ await delay(5000);
28
+ const t3 = await client.taskPhoto();
29
+ console.log(t3);
30
+ await delay(5000);
31
+ const t4 = await client.taskKJ();
32
+ await delay(5000);
33
+ console.log(t4);
34
+ const { familyInfoResp } = await client.getFamilyList();
35
+ console.log(familyInfoResp);
36
+ if (familyInfoResp) {
37
+ for (let index = 0; index < familyInfoResp.length; index += 1) {
38
+ const { familyId } = familyInfoResp[index];
39
+ try {
40
+ const res = await client.familyUserSign(familyId);
41
+ console.log(res);
42
+ } catch (e) {
43
+ console.error(e);
44
+ }
45
+ }
46
+ }
47
+ const info = await client.getUserSizeInfo();
48
+ console.log(info);
49
+ })();
50
+ ``
51
+ ```
@@ -165,7 +165,7 @@ class CloudClient {
165
165
  return this.fetchAPI("https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_SIGNIN&activityId=ACT_SIGNIN");
166
166
  };
167
167
  this.taskPhoto = () => {
168
- return this.fetchAPI("https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_2022_FLDFS_KJ&activityId=ACT_SIGNIN");
168
+ return this.fetchAPI("https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_SIGNIN_PHOTOS&activityId=ACT_SIGNIN");
169
169
  };
170
170
  this.taskKJ = () => {
171
171
  return this.fetchAPI("https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_2022_FLDFS_KJ&activityId=ACT_SIGNIN");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloud189-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "cloud189-sdk",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",