Initial commit.
Classes and interfaces in place. The QueryBuilder generics are still a work in progress
This commit is contained in:
5
src/interfaces/ability.ts
Normal file
5
src/interfaces/ability.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export interface IAbility {
|
||||
name: string;
|
||||
text: string;
|
||||
type: string;
|
||||
}
|
||||
4
src/interfaces/ancientAbility.ts
Normal file
4
src/interfaces/ancientAbility.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface IAncientAbility {
|
||||
name: string;
|
||||
text: string;
|
||||
}
|
||||
7
src/interfaces/attack.ts
Normal file
7
src/interfaces/attack.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export interface IAttack {
|
||||
cost: string;
|
||||
name: string;
|
||||
text: string;
|
||||
damage: string;
|
||||
convertedEnergyCost: string;
|
||||
}
|
||||
37
src/interfaces/card.ts
Normal file
37
src/interfaces/card.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import { IAbility } from '../interfaces/ability';
|
||||
import { IAttack } from '../interfaces/attack';
|
||||
import { ISet } from '../interfaces/set';
|
||||
import { ISubType } from '../interfaces/subType';
|
||||
import { ISuperType } from '../interfaces/superType';
|
||||
import { IType } from '../interfaces/type';
|
||||
|
||||
export interface ICard {
|
||||
id: number;
|
||||
name: string;
|
||||
imageUrl: string;
|
||||
imageUrlHighRes: string;
|
||||
subType: ISubType;
|
||||
superType: ISuperType;
|
||||
ability: IAbility;
|
||||
hp: number;
|
||||
number: number;
|
||||
artist: string;
|
||||
rarity: string;
|
||||
series: string;
|
||||
set: ISet;
|
||||
setCode: string;
|
||||
retreatCost: string;
|
||||
text: string;
|
||||
types: IType[];
|
||||
attacks: IAttack[];
|
||||
weaknesses: string[];
|
||||
resistances: string[];
|
||||
nationalPokedexNumber: number;
|
||||
ancientTrait: string;
|
||||
evolvesFrom: string;
|
||||
|
||||
resource(): string;
|
||||
find(id: number): ICard;
|
||||
all(): ICard[];
|
||||
where(args: object): ICard;
|
||||
}
|
||||
4
src/interfaces/query.ts
Normal file
4
src/interfaces/query.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface IQuery {
|
||||
name: string;
|
||||
value: string;
|
||||
}
|
||||
16
src/interfaces/set.ts
Normal file
16
src/interfaces/set.ts
Normal file
@ -0,0 +1,16 @@
|
||||
export interface ISet {
|
||||
code: string;
|
||||
name: string;
|
||||
series: string;
|
||||
totalCards: number;
|
||||
standardLegal: boolean;
|
||||
expandedLegal: boolean;
|
||||
releaseDate: string;
|
||||
symbolUrl: string;
|
||||
ptcgoCode: string;
|
||||
|
||||
resource(): string;
|
||||
find(id: number): ISet;
|
||||
all(): ISet[];
|
||||
where(args: object): ISet;
|
||||
}
|
||||
4
src/interfaces/subType.ts
Normal file
4
src/interfaces/subType.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface ISubType {
|
||||
resource(): string;
|
||||
all(): ISubType[];
|
||||
}
|
||||
4
src/interfaces/superType.ts
Normal file
4
src/interfaces/superType.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface ISuperType {
|
||||
resource(): string;
|
||||
all(): ISuperType[];
|
||||
}
|
||||
7
src/interfaces/type.ts
Normal file
7
src/interfaces/type.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export interface IType {
|
||||
type: string;
|
||||
value: string;
|
||||
|
||||
resource(): string;
|
||||
all(): IType[];
|
||||
}
|
||||
Reference in New Issue
Block a user