feat: switch back to s3s' namespace (0.1.11)

https://github.com/frozenpandaman/s3s/issues/65
main
spacemeowx2 2022-10-27 19:29:05 +08:00
parent 24384c2a11
commit 4449664c15
3 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import type { StatInkPostBody, VsHistoryDetail } from "./types.ts";
export const AGENT_NAME = "s3si.ts";
export const S3SI_VERSION = "0.1.10";
export const S3SI_VERSION = "0.1.11";
export const NSOAPP_VERSION = "2.3.1";
export const WEB_VIEW_VERSION = "1.0.0-5644e7a2";
export const S3SI_LINK = "https://github.com/spacemeowx2/s3si.ts";
@ -14,6 +14,7 @@ export const DEFAULT_APP_USER_AGENT =
export const SPLATNET3_URL = "https://api.lp1.av5ja.srv.nintendo.net";
export const SPLATNET3_ENDPOINT =
"https://api.lp1.av5ja.srv.nintendo.net/api/graphql";
export const S3S_NAMESPACE = "b3a2dbf5-2c09-4792-b78c-00b548b70aeb";
export const S3SI_NAMESPACE = "63941e1c-e32e-4b56-9a1d-f6fbe19ef6e1";
export const SPLATNET3_STATINK_MAP: {

View File

@ -1,5 +1,7 @@
import {
AGENT_NAME,
S3S_NAMESPACE,
S3SI_NAMESPACE,
S3SI_VERSION,
SPLATNET3_STATINK_MAP,
USERAGENT,
@ -18,8 +20,6 @@ import { base64, msgpack } from "../../deps.ts";
import { APIError } from "../APIError.ts";
import { cache, gameId } from "../utils.ts";
const S3S_NAMESPACE = "b3a2dbf5-2c09-4792-b78c-00b548b70aeb";
/**
* Decode ID and get number after '-'
*/
@ -100,7 +100,7 @@ export class StatInkExporter implements GameExporter {
for (const id of list) {
const s3sId = await gameId(id, S3S_NAMESPACE);
const s3siId = await gameId(id);
const s3siId = await gameId(id, S3SI_NAMESPACE);
if (!uuid.includes(s3sId) && !uuid.includes(s3siId)) {
out.push(id);

View File

@ -1,5 +1,5 @@
import { APIError } from "./APIError.ts";
import { S3SI_NAMESPACE } from "./constant.ts";
import { S3S_NAMESPACE } from "./constant.ts";
import { base64, io, uuid } from "../deps.ts";
const stdinLines = io.readLines(Deno.stdin);
@ -89,7 +89,7 @@ export async function showError<T>(p: Promise<T>): Promise<T> {
*/
export function gameId(
id: string,
namespace = S3SI_NAMESPACE,
namespace = S3S_NAMESPACE,
): Promise<string> {
const fullId = base64.decode(id);
const tsUuid = fullId.slice(fullId.length - 52, fullId.length);