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

Function readShareCode

jd_carnivalcity.js:745–767  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

743}
744
745function readShareCode() {
746 console.log(`开始`)
747 return new Promise(async resolve => {
748 $.get({url: `http://share.turinglabs.net/api/v3/carnivalcity/query/20/`, 'timeout': 20000}, (err, resp, data) => {
749 try {
750 if (err) {
751 console.log(`${JSON.stringify(err)}`)
752 console.log(`${$.name} API请求失败,请检查网路重试`)
753 } else {
754 if (data) {
755 data = JSON.parse(data);
756 }
757 }
758 } catch (e) {
759 $.logErr(e, resp)
760 } finally {
761 resolve(data);
762 }
763 })
764 await $.wait(20000);
765 resolve()
766 })
767}
768//格式化助力码
769function shareCodesFormat() {
770 return new Promise(async resolve => {

Callers 1

shareCodesFormatFunction · 0.70

Calls 4

logMethod · 0.45
getMethod · 0.45
logErrMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected