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

Class Ut

daily/ydyp.js:3975–4228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3973 }
3974}
3975class Ut {
3976 constructor(e, t, r) {
3977 this.rawCookie = String(e || "").trim(), this.config = t, this.reporter = r, this.cookies = {}, this.jwtHeaders = {
3978 "User-Agent": ft,
3979 Accept: "*/*",
3980 Host: "caiyun.feixin.10086.cn:7071"
3981 }, this.noteToken = "", this.noteAuth = "", this.notebookId = "", this.clickNum = t.clickNum, this.drawTimes = t.drawTimes, this.parseCookie(), this.requester = function(e, t) {
3982 return {
3983 request: r,
3984 requestJson: async function(e, t = 3) {
3985 return (await r({
3986 responseType: "json",
3987 ...e
3988 }, t)).data
3989 },
3990 requestText: async function(e, t = 3) {
3991 return (await r({
3992 responseType: "text",
3993 ...e
3994 }, t)).data
3995 }
3996 };
3997 async function r(r, o = 3) {
3998 let n;
3999 for (let s = 0; s < o; s += 1) try {
4000 return await e.request({
4001 timeout: t(),
4002 responseType: "json",
4003 ...r
4004 })
4005 } catch (e) {
4006 n = e, s < o - 1 && await i(1e3)
4007 }
4008 throw n
4009 }
4010 }(gt, () => this.config.requestTimeout);
4011 const o = this;
4012 var n;
4013 this.api = {
4014 ...wt(n = {
4015 get authorization() {
4016 return o.authorization
4017 },
4018 get account() {
4019 return o.account
4020 },
4021 get authToken() {
4022 return o.authToken
4023 },
4024 get config() {
4025 return o.config
4026 },
4027 get jwtHeaders() {
4028 return o.jwtHeaders
4029 },
4030 request: (...e) => o.request(...e),
4031 requestJson: (...e) => o.requestJson(...e),
4032 requestText: (...e) => o.requestText(...e),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected