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

Function cancelDynamicsLike

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

Source from the content-addressed store, hash-verified

552}
553
554async function cancelDynamicsLike(){
555 let headers = {
556 "Cookie": config.xm_cookie,
557 'Content-Type': `application/json`
558 }
559 let body = `{"feedId":217014623}`
560 let myRequest = {
561 url: `https://mobile.ximalaya.com/chaos/v2/feed/praise/delete`,
562 headers: headers,
563 body: body
564 }
565 return await $.http.post(myRequest).then(
566 (response) => {
567 body = JSON.parse(response.body)
568 if (body.ret == 0) {
569 $.log("- 取消动态点赞成功")
570 return true
571 } else {
572 $.log("- !!!未知动态点赞状况")
573 return false
574 }
575 },(reason) => {
576 $.log("- !!!取消动态点赞失败")
577 return false
578 }
579 )
580}
581
582async function createComment(uid, content){
583 let headers = {

Callers 1

mainFunction · 0.85

Calls 3

postMethod · 0.45
parseMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected