MCPcopy Create free account
hub / github.com/Semporia/Scripts / printAPI

Function printAPI

activity/jd_818.js:604–621  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

602 }
603}
604function printAPI() {
605 return new Promise(resolve => {
606 $.get({url: `${printUrl}`, 'timeout': 10000}, (err, resp, data) => {
607 try {
608 if (err) {
609 console.log(`${JSON.stringify(err)}`)
610 console.log(`${$.name} API请求失败,请检查网路重试`)
611 } else {
612 data = JSON.parse(data);
613 }
614 } catch (e) {
615 $.logErr(e, resp)
616 } finally {
617 resolve(data);
618 }
619 })
620 })
621}
622function toHelp(code) {
623 return new Promise(resolve => {
624 const options = {

Callers 1

doHelpFunction · 0.85

Calls 3

getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected