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

Method api

wxapp/ztkd.js:134–143  ·  view source on GitHub ↗
(host, apiPath, data = {}, allowFail = false)

Source from the content-addressed store, hash-verified

132 }
133
134 async api(host, apiPath, data = {}, allowFail = false) {
135 const res = await request({
136 method: "POST",
137 url: `${host}${apiPath}`,
138 headers: this.headers(),
139 data,
140 });
141 if (res.status !== 200 && !allowFail) throw new Error(`HTTP ${res.status}: ${short(res.data)}`);
142 return res.data;
143 }
144
145 async login() {
146 if (this.token) {

Callers 4

loginMethod · 0.95
queryPointsMethod · 0.95
querySignInfoMethod · 0.95
signMethod · 0.95

Calls 3

headersMethod · 0.95
requestFunction · 0.70
shortFunction · 0.70

Tested by

no test coverage detected