MCPcopy Create free account
hub / github.com/ClydeTime/Surge / flushTaskRecords

Function flushTaskRecords

Script/Task/xmly.js:242–268  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

240}
241
242async function flushTaskRecords(){
243 let headers = {
244 "Cookie": config.xm_cookie,
245 'Content-Type' : `application/json`
246 }
247 let body = `{"aid":112}`
248 let myRequest = {
249 url: `http://m.ximalaya.com/web-activity/task/v2/taskRecords?tag=pc`,
250 headers: headers,
251 body: body
252 }
253 return await $.http.post(myRequest).then(
254 (response) => {
255 body = JSON.parse(response.body)
256 if (body.ret == 0) {
257 $.log("- 刷新列表成功")
258 return true
259 } else {
260 $.log("- !!!刷新列表失败")
261 return false
262 }
263 },(reason) => {
264 $.log("- !!!刷新列表失败")
265 return false
266 }
267 )
268}
269
270async function share(){
271 let headers = {

Callers 1

mainFunction · 0.85

Calls 3

postMethod · 0.45
parseMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected