MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / detect

Method detect

wxapp/longfor.js:276–286  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

274 }
275
276 async detect() {
277 const lid = await this.getLid();
278 const collected = await dxCollect(this.options);
279 const param = dxEncrypt(this.mergeOptions({ lid, ...collected }));
280 const data = await this.request(param, "");
281 if (Number(data.status) === 2) {
282 this.setToken(data.data);
283 return data.data;
284 }
285 throw new Error(`dx status: ${data.status}`);
286 }
287
288 async generate() {
289 const lid = await this.getLid();

Callers 1

generateMethod · 0.95

Calls 6

getLidMethod · 0.95
mergeOptionsMethod · 0.95
requestMethod · 0.95
setTokenMethod · 0.95
dxCollectFunction · 0.85
dxEncryptFunction · 0.85

Tested by

no test coverage detected