mirror of
https://github.com/daydreamer-json/ak-endfield-api-archive.git
synced 2026-03-23 15:52:28 +01:00
feat: archive launcher web endpoint metadata
This commit is contained in:
@@ -6,10 +6,12 @@ import launcherWeb from './launcherWeb.js';
|
||||
import u8 from './u8.js';
|
||||
import webview from './webview.js';
|
||||
import zonai from './zonai.js';
|
||||
import defaultSettings from './defaultSettings.js';
|
||||
|
||||
export default {
|
||||
accountService,
|
||||
binding,
|
||||
defaultSettings,
|
||||
gameHub,
|
||||
launcher,
|
||||
launcherWeb,
|
||||
|
||||
@@ -9,10 +9,15 @@ export default {
|
||||
channel: number,
|
||||
subChannel: number,
|
||||
language: (typeof defaultSettings.launcherWebLang)[number],
|
||||
region: 'os' | 'cn',
|
||||
platform: 'Windows' = 'Windows',
|
||||
): Promise<TypesApiAkEndfield.LauncherWebSidebar> => {
|
||||
const apiBase =
|
||||
region === 'cn'
|
||||
? appConfig.network.api.akEndfield.base.launcherCN
|
||||
: appConfig.network.api.akEndfield.base.launcher;
|
||||
const rsp = await ky
|
||||
.post(`https://${appConfig.network.api.akEndfield.base.launcher}/proxy/web/batch_proxy`, {
|
||||
.post(`https://${apiBase}/proxy/web/batch_proxy`, {
|
||||
...defaultSettings.ky,
|
||||
json: {
|
||||
proxy_reqs: [
|
||||
@@ -38,10 +43,15 @@ export default {
|
||||
channel: number,
|
||||
subChannel: number,
|
||||
language: (typeof defaultSettings.launcherWebLang)[number],
|
||||
region: 'os' | 'cn',
|
||||
platform: 'Windows' = 'Windows',
|
||||
): Promise<TypesApiAkEndfield.LauncherWebSingleEnt> => {
|
||||
const apiBase =
|
||||
region === 'cn'
|
||||
? appConfig.network.api.akEndfield.base.launcherCN
|
||||
: appConfig.network.api.akEndfield.base.launcher;
|
||||
const rsp = await ky
|
||||
.post(`https://${appConfig.network.api.akEndfield.base.launcher}/proxy/web/batch_proxy`, {
|
||||
.post(`https://${apiBase}/proxy/web/batch_proxy`, {
|
||||
...defaultSettings.ky,
|
||||
json: {
|
||||
proxy_reqs: [
|
||||
@@ -67,10 +77,15 @@ export default {
|
||||
channel: number,
|
||||
subChannel: number,
|
||||
language: (typeof defaultSettings.launcherWebLang)[number],
|
||||
region: 'os' | 'cn',
|
||||
platform: 'Windows' = 'Windows',
|
||||
): Promise<TypesApiAkEndfield.LauncherWebMainBgImage> => {
|
||||
const apiBase =
|
||||
region === 'cn'
|
||||
? appConfig.network.api.akEndfield.base.launcherCN
|
||||
: appConfig.network.api.akEndfield.base.launcher;
|
||||
const rsp = await ky
|
||||
.post(`https://${appConfig.network.api.akEndfield.base.launcher}/proxy/web/batch_proxy`, {
|
||||
.post(`https://${apiBase}/proxy/web/batch_proxy`, {
|
||||
...defaultSettings.ky,
|
||||
json: {
|
||||
proxy_reqs: [
|
||||
@@ -96,10 +111,15 @@ export default {
|
||||
channel: number,
|
||||
subChannel: number,
|
||||
language: (typeof defaultSettings.launcherWebLang)[number],
|
||||
region: 'os' | 'cn',
|
||||
platform: 'Windows' = 'Windows',
|
||||
): Promise<TypesApiAkEndfield.LauncherWebBanner> => {
|
||||
const apiBase =
|
||||
region === 'cn'
|
||||
? appConfig.network.api.akEndfield.base.launcherCN
|
||||
: appConfig.network.api.akEndfield.base.launcher;
|
||||
const rsp = await ky
|
||||
.post(`https://${appConfig.network.api.akEndfield.base.launcher}/proxy/web/batch_proxy`, {
|
||||
.post(`https://${apiBase}/proxy/web/batch_proxy`, {
|
||||
...defaultSettings.ky,
|
||||
json: {
|
||||
proxy_reqs: [
|
||||
@@ -125,10 +145,15 @@ export default {
|
||||
channel: number,
|
||||
subChannel: number,
|
||||
language: (typeof defaultSettings.launcherWebLang)[number],
|
||||
region: 'os' | 'cn',
|
||||
platform: 'Windows' = 'Windows',
|
||||
): Promise<TypesApiAkEndfield.LauncherWebAnnouncement> => {
|
||||
const apiBase =
|
||||
region === 'cn'
|
||||
? appConfig.network.api.akEndfield.base.launcherCN
|
||||
: appConfig.network.api.akEndfield.base.launcher;
|
||||
const rsp = await ky
|
||||
.post(`https://${appConfig.network.api.akEndfield.base.launcher}/proxy/web/batch_proxy`, {
|
||||
.post(`https://${apiBase}/proxy/web/batch_proxy`, {
|
||||
...defaultSettings.ky,
|
||||
json: {
|
||||
proxy_reqs: [
|
||||
|
||||
Reference in New Issue
Block a user