mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-17 21:57:44 +00:00
commit
8c99081c6f
1 changed files with 14 additions and 30 deletions
|
|
@ -21,33 +21,29 @@ export default class ZZZApiTool {
|
||||||
this.hostPublicData = 'https://public-data-api.mihoyo.com/';
|
this.hostPublicData = 'https://public-data-api.mihoyo.com/';
|
||||||
} else {
|
} else {
|
||||||
this.host = 'https://sg-public-api.hoyolab.com/';
|
this.host = 'https://sg-public-api.hoyolab.com/';
|
||||||
this.hostRecord = 'https://bbs-api-os.hoyolab.com/';
|
this.hostRecord = 'https://sg-act-nap-api.hoyolab.com/';
|
||||||
this.hostPublicData = 'https://sg-public-data-api.hoyoverse.com/';
|
this.hostPublicData = 'https://sg-public-data-api.hoyoverse.com/';
|
||||||
}
|
}
|
||||||
this.zzzUrlMap = {
|
this.zzzUrlMap = {
|
||||||
zzzUser: {
|
|
||||||
url: `${this.host}binding/api/getUserGameRolesByCookie`,
|
|
||||||
query: `game_biz=nap_cn®ion=${this.server}&game_uid=${this.uid}`,
|
|
||||||
},
|
|
||||||
zzzNote: {
|
zzzNote: {
|
||||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/note`,
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/note`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}`,
|
query: `role_id=${this.uid}&server=${this.server}`,
|
||||||
},
|
},
|
||||||
zzzIndex: {
|
zzzIndex: {
|
||||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/index`,
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/index`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}`,
|
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}`,
|
||||||
},
|
},
|
||||||
zzzAvatarList: {
|
zzzAvatarList: {
|
||||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/avatar/basic`,
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/avatar/basic`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}`,
|
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}`,
|
||||||
},
|
},
|
||||||
zzzAvatarInfo: {
|
zzzAvatarInfo: {
|
||||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/avatar/info`,
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/avatar/info`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}&need_wiki=false`,
|
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}&need_wiki=false`,
|
||||||
},
|
},
|
||||||
zzzBuddyList: {
|
zzzBuddyList: {
|
||||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/buddy/info`,
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/buddy/info`,
|
||||||
query: `role_id=${this.uid}&server=${this.server}`,
|
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}`,
|
||||||
},
|
},
|
||||||
zzzAuthKey: {
|
zzzAuthKey: {
|
||||||
url: `${this.host}binding/api/genAuthKey`,
|
url: `${this.host}binding/api/genAuthKey`,
|
||||||
|
|
@ -67,6 +63,10 @@ export default class ZZZApiTool {
|
||||||
zzz: {
|
zzz: {
|
||||||
...(['prod_gf_cn'].includes(this.server)
|
...(['prod_gf_cn'].includes(this.server)
|
||||||
? {
|
? {
|
||||||
|
zzzUser: {
|
||||||
|
url: `${this.host}binding/api/getUserGameRolesByCookie`,
|
||||||
|
query: `game_biz=nap_cn®ion=${this.server}&game_uid=${this.uid}`,
|
||||||
|
},
|
||||||
getFp: {
|
getFp: {
|
||||||
url: `${this.hostPublicData}device-fp/api/getFp`,
|
url: `${this.hostPublicData}device-fp/api/getFp`,
|
||||||
body: {
|
body: {
|
||||||
|
|
@ -82,6 +82,10 @@ export default class ZZZApiTool {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
|
zzzUser: {
|
||||||
|
url: `${this.host}binding/api/getUserGameRolesByCookie`,
|
||||||
|
query: `game_biz=nap_global®ion=${this.server}&game_uid=${this.uid}`,
|
||||||
|
},
|
||||||
getFp: {
|
getFp: {
|
||||||
url: `${this.hostPublicData}device-fp/api/getFp`,
|
url: `${this.hostPublicData}device-fp/api/getFp`,
|
||||||
body: {
|
body: {
|
||||||
|
|
@ -100,26 +104,6 @@ export default class ZZZApiTool {
|
||||||
...this.zzzUrlMap,
|
...this.zzzUrlMap,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (/_us|_eu|_jp|_sg/.test(this.server)) {
|
|
||||||
urlMap.zzz.zzzNote.url =
|
|
||||||
'https://sg-act-nap-api.hoyolab.com/event/game_record_zzz/api/zzz/note';
|
|
||||||
urlMap.zzz.zzzNote.query = `role_id=${this.uid}&server=${this.server}`;
|
|
||||||
urlMap.zzz.zzzIndex.url =
|
|
||||||
'https://sg-act-nap-api.hoyolab.com/event/game_record_zzz/api/zzz/index';
|
|
||||||
urlMap.zzz.zzzIndex.query = `lang=zh-cn&role_id=${this.uid}&server=${this.server}`;
|
|
||||||
urlMap.zzz.zzzAvatarList.url =
|
|
||||||
'https://sg-act-nap-api.hoyolab.com/event/game_record_zzz/api/zzz/avatar/basic';
|
|
||||||
urlMap.zzz.zzzAvatarList.query = `role_id=${this.uid}&server=${this.server}`;
|
|
||||||
urlMap.zzz.zzzAvatarInfo.url =
|
|
||||||
'https://sg-act-nap-api.hoyolab.com/event/game_record_zzz/api/zzz/avatar/info';
|
|
||||||
urlMap.zzz.zzzAvatarInfo.query = `role_id=${this.uid}&server=${this.server}&need_wiki=false`;
|
|
||||||
urlMap.zzz.zzzBuddyList.url =
|
|
||||||
'https://sg-act-nap-api.hoyolab.com/event/game_record_zzz/api/zzz/buddy/info';
|
|
||||||
urlMap.zzz.zzzBuddyList.query = `role_id=${this.uid}&server=${this.server}`;
|
|
||||||
urlMap.zzzUser.url = `${this.host}binding/api/getUserGameRolesByCookie`;
|
|
||||||
urlMap.zzzUser.query = `game_biz=nap_global®ion=${this.server}&game_uid=${this.uid}`;
|
|
||||||
}
|
|
||||||
return urlMap[this.game];
|
return urlMap[this.game];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue