cgserver 10.2.2 → 10.2.4
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.
|
@@ -39,6 +39,25 @@ class CgRankTool {
|
|
|
39
39
|
this._password = password;
|
|
40
40
|
return true;
|
|
41
41
|
}
|
|
42
|
+
async setTimeout(key, timeout) {
|
|
43
|
+
let msg = {
|
|
44
|
+
cmd: "setTimeout",
|
|
45
|
+
key: key,
|
|
46
|
+
timeout: timeout,
|
|
47
|
+
password: this._password
|
|
48
|
+
};
|
|
49
|
+
await HttpTool_1.gHttpTool.post({ url: this._url, json: msg });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
async getTimeout(key) {
|
|
53
|
+
let msg = {
|
|
54
|
+
cmd: "getTimeout",
|
|
55
|
+
key: key,
|
|
56
|
+
password: this._password
|
|
57
|
+
};
|
|
58
|
+
let rs = await HttpTool_1.gHttpTool.post({ url: this._url, json: msg });
|
|
59
|
+
return rs.body;
|
|
60
|
+
}
|
|
42
61
|
/**
|
|
43
62
|
*
|
|
44
63
|
* @param key 排行榜的关键字
|
|
@@ -25,13 +25,17 @@ export declare class CgRankCommandItem {
|
|
|
25
25
|
[key: string]: number;
|
|
26
26
|
};
|
|
27
27
|
set: {
|
|
28
|
-
[key: string]:
|
|
28
|
+
[key: string]: any;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
export declare class CgRankTool {
|
|
32
32
|
protected _url: string;
|
|
33
33
|
protected _password: string;
|
|
34
34
|
init(url: string, password: string): boolean;
|
|
35
|
+
setTimeout(key: string, timeout: number): Promise<void>;
|
|
36
|
+
getTimeout(key: string): Promise<{
|
|
37
|
+
timeout: number;
|
|
38
|
+
}>;
|
|
35
39
|
/**
|
|
36
40
|
*
|
|
37
41
|
* @param key 排行榜的关键字
|