diff --git a/src/services/cardService.ts b/src/services/cardService.ts index e483170..f5abeab 100644 --- a/src/services/cardService.ts +++ b/src/services/cardService.ts @@ -1,5 +1,9 @@ import { Query } from "../interfaces/query"; import { Card } from "../interfaces/card"; +import { Type } from '../enums/type'; +import { Supertype } from '../enums/supertype'; +import { Subtype } from '../enums/subtype'; +import { Rarity } from '../enums/rarity'; import { Client } from "../client"; export async function findCardByID(id: string): Promise { @@ -20,4 +24,32 @@ export async function getAllCards(): Promise { const client: Client = Client.getInstance(); const response: Card[] = await client.get('cards', param); return response; +} + +export async function getTypes(): Promise { + const client: Client = Client.getInstance(); + + const response: Type[] = await client.get('types'); + return response; +} + +export async function getSupertypes(): Promise { + const client: Client = Client.getInstance(); + + const response: Supertype[] = await client.get('supertypes'); + return response; +} + +export async function getSubtypes(): Promise { + const client: Client = Client.getInstance(); + + const response: Subtype[] = await client.get('subtypes'); + return response; +} + +export async function getRarities(): Promise { + const client: Client = Client.getInstance(); + + const response: Rarity[] = await client.get('rarities'); + return response; } \ No newline at end of file