mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-03 20:38:17 +03:00
Update ARC support to iidx28
This commit is contained in:
@@ -13,7 +13,7 @@ t.test("#CreateArcIIDXClassHandler", (t) => {
|
||||
|
||||
t.test("Should return a working ClassHandler.", async (t) => {
|
||||
const mockFetch = MockJSONFetch({
|
||||
"https://arc.example.com/api/v1/iidx/27/profiles?_id=profile": {
|
||||
"https://arc.example.com/api/v1/iidx/28/profiles?_id=profile": {
|
||||
_items: [
|
||||
{
|
||||
sp: {
|
||||
@@ -44,7 +44,7 @@ t.test("#CreateArcIIDXClassHandler", (t) => {
|
||||
|
||||
t.test("Should handle null.", async (t) => {
|
||||
const mockFetch = MockJSONFetch({
|
||||
"https://arc.example.com/api/v1/iidx/27/profiles?_id=profile": {
|
||||
"https://arc.example.com/api/v1/iidx/28/profiles?_id=profile": {
|
||||
_items: [
|
||||
{
|
||||
sp: {
|
||||
@@ -74,7 +74,7 @@ t.test("#CreateArcIIDXClassHandler", (t) => {
|
||||
|
||||
t.test("Should handle undefined.", async (t) => {
|
||||
const mockFetch = MockJSONFetch({
|
||||
"https://arc.example.com/api/v1/iidx/27/profiles?_id=profile": {
|
||||
"https://arc.example.com/api/v1/iidx/28/profiles?_id=profile": {
|
||||
_items: [{}],
|
||||
},
|
||||
});
|
||||
@@ -95,7 +95,7 @@ t.test("#CreateArcIIDXClassHandler", (t) => {
|
||||
|
||||
t.test("Should handle invalid classes.", async (t) => {
|
||||
const mockFetch = MockJSONFetch({
|
||||
"https://arc.example.com/api/v1/iidx/27/profiles?_id=profile": {
|
||||
"https://arc.example.com/api/v1/iidx/28/profiles?_id=profile": {
|
||||
_items: [
|
||||
{
|
||||
sp: {
|
||||
@@ -119,7 +119,7 @@ t.test("#CreateArcIIDXClassHandler", (t) => {
|
||||
|
||||
t.test("Should trigger failsafe if invalid playtype is used.", async (t) => {
|
||||
const mockFetch = MockJSONFetch({
|
||||
"https://arc.example.com/api/v1/iidx/27/profiles?_id=profile": {
|
||||
"https://arc.example.com/api/v1/iidx/28/profiles?_id=profile": {
|
||||
_items: [
|
||||
{
|
||||
sp: {
|
||||
|
||||
@@ -17,7 +17,7 @@ export async function CreateArcIIDXClassHandler(
|
||||
// SP and DP dans are located in the same place,
|
||||
// fetch once, then return a function that traverses this data.
|
||||
try {
|
||||
const url = CreateURLWithParams(`${ServerConfig.ARC_API_URL}/api/v1/iidx/27/profiles`, {
|
||||
const url = CreateURLWithParams(`${ServerConfig.ARC_API_URL}/api/v1/iidx/28/profiles`, {
|
||||
_id: profileID,
|
||||
});
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@ t.test("#ParseArcIIDX", (t) => {
|
||||
t.beforeEach(ResetDBState);
|
||||
|
||||
const mockArcAPI = MockJSONFetch({
|
||||
"https://arc.example.com/api/v1/iidx/27/player_bests?profile_id=profile": {
|
||||
"https://arc.example.com/api/v1/iidx/28/player_bests?profile_id=profile": {
|
||||
_links: {
|
||||
_next: "https://arc.example.com/api/v1/iidx/27/player_bests?profile_id=profile&page=2",
|
||||
_next: "https://arc.example.com/api/v1/iidx/28/player_bests?profile_id=profile&page=2",
|
||||
},
|
||||
_items: [1, 2, 3],
|
||||
},
|
||||
"https://arc.example.com/api/v1/iidx/27/player_bests?profile_id=profile&page=2": {
|
||||
"https://arc.example.com/api/v1/iidx/28/player_bests?profile_id=profile&page=2": {
|
||||
_links: {
|
||||
_next: null,
|
||||
},
|
||||
|
||||
@@ -24,8 +24,8 @@ export async function ParseArcIIDX(
|
||||
return {
|
||||
iterable: TraverseKaiAPI(
|
||||
ServerConfig.ARC_API_URL,
|
||||
// HEROIC VERSE
|
||||
`/api/v1/iidx/27/player_bests?profile_id=${authDoc.accountID}`,
|
||||
// BISTROVER
|
||||
`/api/v1/iidx/28/player_bests?profile_id=${authDoc.accountID}`,
|
||||
ServerConfig.ARC_AUTH_TOKEN,
|
||||
logger,
|
||||
null,
|
||||
|
||||
Reference in New Issue
Block a user