Added multiple endpoints (#18)

Added new endpoints:
energyTypes
trainerTypes
suffixes
stages
dexIds
regulationMarks
variants
This commit is contained in:
2021-10-07 13:04:23 +02:00
committed by GitHub
parent 19f060bfd6
commit 5069fb9945
22 changed files with 761 additions and 377 deletions

View File

@ -2,7 +2,7 @@
import { setToSetSimple } from './setUtil'
import { cardIsLegal, fetchRemoteFile, smartGlob } from './util'
import { Set, SupportedLanguages, Card, Types } from 'db/interfaces'
import { Card as CardSingle, CardResume } from '@tcgdex/sdk/interfaces'
import { Card as CardSingle, CardResume } from '@tcgdex/sdk/dist/types/interfaces'
import translate from './translationUtil'
export async function getCardPictures(cardId: string, card: Card, lang: SupportedLanguages): Promise<string | undefined> {

View File

@ -1,7 +1,7 @@
import { smartGlob } from './util'
import { setToSetSimple, getSets } from './setUtil'
import { Serie, SupportedLanguages, Set } from 'db/interfaces'
import { Serie as SerieSingle, SerieResume } from '@tcgdex/sdk/interfaces'
import { Serie as SerieSingle, SerieResume } from '@tcgdex/sdk/dist/types/interfaces'
export async function getSerie(name: string): Promise<Serie> {
return (await import(`../db/data/${name}.js`)).default

View File

@ -1,7 +1,7 @@
import { Set, SupportedLanguages } from 'db/interfaces'
import { fetchRemoteFile, setIsLegal, smartGlob } from './util'
import { cardToCardSimple, getCards } from './cardUtil'
import { SetResume, Set as SetSingle } from '@tcgdex/sdk/interfaces'
import { SetResume, Set as SetSingle } from '@tcgdex/sdk/dist/types/interfaces'
interface t {
[key: string]: Set